Back to list
a-jay85

code-review

by a-jay85

0🍴 1📅 Jan 22, 2026

SKILL.md


name: code-review description: Final validation checklist for IBL5 pull requests before merge. Use when reviewing PRs, validating refactored code, or preparing for merge.

IBL5 Code Review Checklist

Validate code quality, test coverage, and documentation before PR merge.

1. Code Quality

Class Autoloading

  • No require() or require_once() for classes
  • All classes in ibl5/classes/ directory
  • Class filename matches class name

Type Safety

  • declare(strict_types=1); in every PHP file
  • Complete type hints on ALL methods
  • Return types specified (including void, ?Type)

Interface Compliance

  • All classes implement their interface
  • Method signatures match interface exactly
  • @see InterfaceName::methodName() docblocks present

Constructor Verification

CRITICAL: Before confirming any class is correct:

  1. Find the __construct() method signature
  2. Count required vs optional parameters
  3. Search for all usages: grep -r "new ClassName"
  4. Verify every instantiation passes correct arguments

2. Database Operations

Dual Implementation Support

  • method_exists($db, 'sql_escape_string') check present
  • Legacy path uses DatabaseService::escapeString()
  • Modern path uses prepared statements

Security

  • No string interpolation with user input in SQL
  • All output uses HtmlSanitizer::safeHtmlOutput()
  • Whitelist validation for enumerated values

3. Testing

Test Registration

  • Test directory exists in ibl5/tests/ModuleName/
  • Tests registered in ibl5/phpunit.xml

Test Quality

  • No markTestSkipped() calls
  • No ReflectionClass for private methods
  • Descriptive test method names
  • One behavior per test

Test Results

cd ibl5 && vendor/bin/phpunit tests/ModuleName/
  • All tests pass
  • No warnings
  • No failures

4. Documentation

  • STRATEGIC_PRIORITIES.md - Module marked complete
  • REFACTORING_HISTORY.md - Entry added
  • ibl5/classes/ModuleName/README.md - Created
  • DEVELOPMENT_GUIDE.md - Counts updated

5. Code Cleanup

  • No unused method parameters
  • No commented-out code blocks
  • Domain values are class constants
  • No magic numbers/strings

Report Format

## PR Review: ModuleName Module

### ✅ Passed Checks
- [List items that passed]

### ⚠️ Issues Found
**File:** `path/to/file.php:line`
**Issue:** Description
**Recommendation:** How to fix

### 📊 Summary
| Category | Status |
|----------|--------|
| Code Quality | ✅/⚠️/❌ |
| Database Security | ✅/⚠️/❌ |
| Test Coverage | ✅/⚠️/❌ |
| Documentation | ✅/⚠️/❌ |

### Recommendation
- [ ] Ready for merge
- [ ] Needs minor fixes
- [ ] Needs significant work

Final Verification

cd ibl5 && vendor/bin/phpunit  # Full suite - zero warnings/failures

PR ready for merge only when ALL checks pass.

Score

Total Score

50/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

Reviews

💬

Reviews coming soon