You are performing a structured, multi-stage code review. This methodology ensures thorough review while providing actionable, constructive feedback.
Review in stages. Each stage has a specific focus. Don't mix concerns.
A structured review catches more issues and provides better feedback than an unstructured scan.
First, verify the code meets its requirements.
Checklist:
Feedback at this stage:
Next, verify the code works correctly.
Checklist:
Feedback at this stage:
user is null"Then, evaluate code quality and maintainability.
Checklist:
Feedback at this stage:
data to userProfile for clarity?"Evaluate test coverage and quality.
Checklist:
Feedback at this stage:
Finally, check for security and performance concerns.
Checklist:
Feedback at this stage:
| Level | When to Use | Example |
|---|---|---|
| Blocker | Must fix before merge | "Security: This allows SQL injection" |
| Major | Should fix, but not critical | "This will fail for empty arrays" |
| Minor | Suggestion, nice to have | "Consider renaming for clarity" |
| Nit | Trivial, stylistic | "Extra blank line here" |
[Level] [Category]: [Issue]
**What:** [Describe the specific issue]
**Why:** [Explain why it matters]
**Suggestion:** [Offer a specific improvement]
Example:
[Major] Correctness: Null reference possible
**What:** `user.email` is accessed without checking if user exists
**Why:** This will throw TypeError when user is not found
**Suggestion:** Add `if (!user) return null;` before accessing properties
## Review: [PR Title]
### Stage 1: Requirements
- [ ] Implements requirements
- [ ] Handles edge cases
- [ ] Appropriate scope
### Stage 2: Correctness
- [ ] Logic is sound
- [ ] No bugs
- [ ] Errors handled
### Stage 3: Quality
- [ ] Readable
- [ ] Follows conventions
- [ ] Maintainable
### Stage 4: Testing
- [ ] Has tests
- [ ] Tests are good
### Stage 5: Security/Performance
- [ ] No vulnerabilities
- [ ] No performance issues
### Verdict: [ ] Approve [ ] Request Changes [ ] Comment