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

Code Review Checklist: Pull Request Guidelines

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

S

schutzgeist

4 min read
Code Review Checklist: Pull Request Guidelines

Code Review Checklist

A structured checklist helps you conduct code reviews consistently and efficiently. This article provides a comprehensive checklist covering every aspect 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.

Overview

Code review checklists are structured lists of review points that ensure all relevant aspects of a pull request are examined systematically. They help reviewers maintain consistent quality standards and guide authors toward the most important changes. A solid checklist covers functional correctness, security, performance, test coverage, documentation, and architecture.

The Checklist

1. PR Description and Context

  • Clear description: What changed and why?
  • Issue link: Ticket or task is referenced
  • Testing 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 and error cases handled
  • Error handling: Exceptions handled appropriately
  • Input validation: All inputs validated
  • Resource cleanup: Files and connections closed properly

3. Security

  • SQL injection: Parameterized queries used
  • XSS: User input escaped
  • Authentication: Only authorized access allowed
  • Secrets: No credentials or sensitive data in code
  • Input validation: All inputs validated

4. Performance

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

5. Code Style and Readability

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

6. Tests

  • Unit tests: New logic covered
  • 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 needed
  • API docs: API changes documented
  • Inline docs: Complex functions documented
  • Changelog: Updated
  • Migration guide: Breaking changes documented

8. Architecture and Design

  • SOLID: Principles followed
  • Cohesion: Related code in same module
  • Coupling: Loose coupling between modules
  • Abstraction: Correct level of abstraction
  • Scalability: Design scales with requirements

9. Git Practices

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

10. CI/CD

  • CI green: All checks pass
  • Build: Build succeeds
  • Tests: All tests pass
  • Lint: No linter errors
  • Security scan: No vulnerabilities found

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 moved to a service
- Integration tests missing for API endpoints

### ❏ Questions
- Why was JWT chosen over OAuth2?
- Is token refresh flow implemented?

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

Prioritization

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

Key Takeaways

  • Use a structured checklist for consistent reviews
  • Cover logic, security, performance, tests, and documentation
  • Prioritize: 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 that ensures consistent code reviews.

2. What categories should a checklist include?

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

3. How should feedback be prioritized?

Critical > High > Medium > Low. Critical issues block the merge.

4. What counts as critical?

Security vulnerabilities, logic errors, and missing tests.

5. What should a PR description contain?

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

6. How do you review security?

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

7. How do you review performance?

Look for N+1 queries, missing caching, inefficient algorithms, memory leaks, and blocking I/O.

8. What should you check in tests?

Unit tests, integration tests, edge case coverage, overall coverage, and test stability.

9. What should be documented?

README updates, API documentation, inline documentation for complex code, changelog, and migration guides.

10. What Git practices matter?

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

11. What should pass in CI/CD?

All checks, build, tests, linting, and security scans.

12. How long should a review take?

With a checklist, 15-30 minutes for small pull requests.

13. Should every checklist be customized?

Yes, adapt it to your project and team.

14. How should breaking changes be handled?

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

15. What can be automated?

Linting, security scanning, and testing via CI/CD pipelines.

Continue 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.

Sources

  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 dive deeper into code reviews, quality assurance, and software quality, 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