Skip to content
IRC-CodingIRC-Coding
Code ReviewChecklistPull RequestReview ChecklistSoftware Quality

Code Review Checklist: Structured Pull Request Audits

Code review checklist for logic, security, performance, tests, documentation, and best practices in effective reviews.

S

schutzgeist

4 min read
Code Review Checklist: Structured Pull Request Audits

Code Review Checklist

A structured checklist helps you conduct code reviews consistently and efficiently. This article provides a comprehensive checklist covering all aspects of a pull request.

In a Nutshell

Code review checklist: verify logic, security, performance, tests, documentation, and architecture. Keep PRs small, write clear descriptions, and offer constructive feedback—these are the keys to success.

Technical Overview

Code review checklists are structured lists of review points that ensure all relevant aspects of a pull request receive systematic attention. They help reviewers maintain consistent quality standards and guide authors toward what matters most. A good checklist covers functional correctness, security, performance, test coverage, documentation, and architecture.

The Checklist

1. PR Description and Context

  • Clear description: What changed and why?
  • Ticket reference: Issue or task is linked
  • Test strategy: How was this tested?
  • Screenshots: Included for UI changes
  • Breaking changes: Documented if present

2. Logic and Functionality

  • Correctness: Does the code do what it should?
  • Edge cases: Boundary conditions and error cases handled
  • Error handling: Exceptions handled properly
  • Validation: Inputs are validated
  • Resource cleanup: Files and connections closed

3. Security

  • SQL Injection: Parameterized queries used
  • XSS: User input properly escaped
  • Authentication: Only authorized access allowed
  • Sensitive data: No secrets in the code
  • Input validation: All inputs validated

4. Performance

  • Database queries: N+1 problem avoided
  • Caching: Caching used where appropriate
  • Algorithm: Efficient algorithm chosen
  • Memory leaks: No memory leaks present
  • Async operations: Non-blocking I/O used

5. Code Style and Readability

  • Naming: Meaningful variable and function names
  • Functions: Small and single responsibility
  • Comments: Explain why, not what
  • Duplication: DRY principle followed
  • Linter: No linting errors

6. Tests

  • Unit tests: New logic has tests
  • Integration tests: API endpoints tested
  • Edge cases: Tests for boundary conditions
  • Coverage: Test coverage adequate
  • Flaky tests: No unreliable tests

7. Documentation

  • README: Updated if necessary
  • API docs: API changes documented
  • Inline docs: Complex functions documented
  • Changelog: Changelog updated
  • Migration guide: Breaking changes documented

8. Architecture and Design

  • SOLID: Principles followed
  • Cohesion: Related code grouped in modules
  • Coupling: Loose coupling between modules
  • Abstraction: Appropriate abstraction level
  • Scalability: Design scales with growth

9. Git Practices

  • Commit messages: Conventional commits used
  • Branch name: Descriptive branch naming
  • Commits: Logically grouped commits
  • Merge strategy: Consistent rebase or merge approach
  • WIP commits: No work-in-progress commits in final PR

10. CI/CD

  • CI passes: All checks successful
  • Build: Build succeeds
  • Tests: All tests pass
  • Lint: No linting errors
  • Security scan: No vulnerabilities detected

Example Review

## Code Review: JWT Authentication

### ✅ Strengths
- Clean separation of auth logic and controller
- Comprehensive unit tests
- Detailed PR description

### ⚠️ Improvements
- Secret should be read from environment variables
- Token validation could be extracted into a service
- Integration tests missing for API endpoints

### ❓ Questions
- Why JWT instead of OAuth2?
- Is the token refresh flow implemented?

### ✏️ Changes Required
- [ ] Read secret from environment variables
- [ ] Add integration tests

Prioritization

PriorityCategoryFocus
CriticalSecurity, LogicBlocks merge
HighPerformance, TestsShould be fixed
MediumStyle, DocumentationCan be addressed later
LowNitpicksOptional

Review Key Takeaways

  • Use a structured checklist for consistent reviews
  • Categories: logic, security, performance, tests, documentation
  • Prioritization: Critical > High > Medium > Low
  • Integrate CI/CD as a quality gate
  • Document breaking changes

FAQ

1. What is a code review checklist?

A structured list of review points to ensure consistent code reviews.

2. What categories should a checklist include?

Logic, security, performance, tests, documentation, architecture, Git practices, and CI/CD.

3. How do you prioritize feedback?

Critical > High > Medium > Low. Critical items block merge.

4. What counts as critical?

Security vulnerabilities, logic errors, and missing tests.

5. What should go in the PR description?

What changed, why it changed, how it was tested, screenshots, and any breaking changes.

6. How do you review for security?

Check for SQL injection, XSS, authentication, secrets, and input validation.

7. How do you review for performance?

Look for N+1 queries, caching opportunities, algorithm efficiency, memory leaks, and async usage.

8. What should tests cover?

Unit tests, integration tests, edge cases, adequate coverage, and no flaky tests.

9. What documentation is needed?

README updates, API documentation, inline comments for complex code, changelog entries, and migration guides for breaking changes.

10. What Git practices matter?

Conventional commits, descriptive branch names, and logically grouped commits.

11. What CI/CD checks are essential?

All checks pass, successful build, all tests pass, no linting errors, and security scans clean.

12. How long should a review take?

15–30 minutes for small PRs when using a checklist.

13. Should every checklist be customized?

Yes, adapt it to your project and team needs.

14. What about breaking changes?

Document them, provide a migration guide, and update the changelog.

15. Which checks should be automated?

Automate linting, security scanning, and test execution in your CI/CD pipeline.

Continue in the Software Quality Learning Path

The next article in the software quality learning path covers Static Code Analysis Tools—automated tools for code quality checks like ESLint, SonarQube, and Pylint.

References

  1. https://google.github.io/eng-practices/review/reviewer/
  2. https://github.com/features/pull-requests
  3. https://martinfowler.com/articles/code-review-checklist.html

To deepen your knowledge of code reviews, quality assurance, and software engineering practices, check out these recommended titles:

Software Engineering

Books about software quality, clean code, code reviews and software development processes

Clean Code: A Handbook of Agile Software Craftsmanship von Robert C. Martin

Clean Code: A Handbook of Agile Software Craftsmanship von Robert C. Martin

Bei Amazon ansehen

Affiliate-Link: Bei einem Kauf erhalten wir möglicherweise eine Provision.

The Pragmatic Programmer: Your Journey to Mastery von David Thomas, Andrew Hunt

The Pragmatic Programmer: Your Journey to Mastery von David Thomas, Andrew Hunt

Bei Amazon ansehen

Affiliate-Link: Bei einem Kauf erhalten wir möglicherweise eine Provision.

Back to Blog
Share:

Related Posts