Free template

Code review checklist

A good code review catches bugs, spreads knowledge and keeps a codebase easy to change. This checklist helps reviewers look at the things that matter, in a sensible order, without turning reviews into arguments about style.

  • Seven groups of checks
  • Author and reviewer sides
  • Comment guide included

Template

Code review checklist

ProjectPrepared byDateVersion

01Before asking for review (author)

  • The pull request says what changed and why, with a link to the ticket
  • It is small enough to review in one sitting
  • Tests pass locally and in the build
  • The author has read their own diff once
  • Screenshots or recordings are attached for visible changes

02Purpose and design

  • The change does what the ticket asks, and nothing unrelated
  • The approach fits the existing design of the code
  • Nothing is duplicated that already exists elsewhere

03Correctness

  • Edge cases are handled - empty, very large, missing and unexpected input
  • Errors are handled and reported, not swallowed
  • Concurrency and ordering issues are considered where relevant
  • Dates, time zones, money and rounding are handled correctly

04Tests

  • New behaviour has tests, including a failing case
  • Tests check outcomes, not implementation details
  • Fixed bugs come with a test that would have caught them

05Security and data

  • Input is validated and output is escaped
  • Permissions are checked on the server, not only in the interface
  • No secrets, keys or personal data in code or logs
  • Database changes have a migration and a way back

06Performance

  • No queries inside loops that could run thousands of times
  • Large lists are paginated
  • Expensive work is not done on every request without need

07Readability

  • Names say what things are and do
  • Comments explain why, not what
  • Formatting is left to the automatic formatter

08Review notes

File or lineCommentTypeResolved

Free template from Stegnor · stegnor.com/templates

How to use it

Three steps to a finished document

  1. 01

    Author prepares

    Keep the change small, describe it clearly and check it yourself before asking anyone else.

  2. 02

    Reviewer checks in order

    Start with purpose and correctness, then tests and security, then performance and readability.

  3. 03

    Label comments and resolve

    Mark each comment as blocking, a suggestion or a question, so the author knows what must change.

What reviews are for

Code review finds defects, but its larger value is shared understanding: at least two people know every part of the system, and standards spread without a manual. Reviews that focus on substance build that. Reviews that argue about spacing and naming taste waste it, which is why formatting belongs to an automatic tool and not to the reviewer.

Labelling comments

Many teams prefix comments so the author knows what is expected:

  • Blocking: must change before merge, such as a bug or a security problem.
  • Suggestion: an improvement the author may take or leave.
  • Question: the reviewer wants to understand, not necessarily change.
  • Praise: worth saying when something is done well.

A filled-in example

Fictional review notes on a change that adds booking cancellation:

Comment Type
Cancellation is checked only in the app; the API accepts it from any user Blocking
The refund amount is rounded before tax is applied Blocking
Could reuse the existing date helper here Suggestion
Why is the cut-off 24 hours? Is that from the client? Question

Small pull requests

Review quality drops sharply as changes grow. A change of a few hundred lines gets careful attention; a change of several thousand gets skimmed. Splitting work into smaller pull requests is the single easiest way to improve reviews.

Mistakes to avoid

  • Reviewing style by hand. Automate formatting and linting, and spend review time on logic.
  • Approving without running anything. For risky changes, check out the branch or review the test results properly.
  • Comments without a label. The author cannot tell a must-fix from a passing thought.
  • Slow reviews. A review that waits days blocks the author and invites larger, riskier pull requests.

Terms used: Code review · Regression testing · Technical debt · Code coverage

Questions, answered

For a small pull request, often well under an hour. If a review takes much longer, the change is probably too big.

Someone who knows the area of the code, and from time to time someone who does not, so knowledge spreads.

If you have developers, yes, at least for key changes. If not, ask the supplier how they review and test their work.

Keep exploring

Where to go next.

By the Stegnor team · Updated