# Code review checklist

Project: ____________ | Prepared by: ____________ | Date: ____________ | Version: ____

## 1. Before 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

## 2. Purpose 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

## 3. Correctness

- [ ] 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

## 4. Tests

- [ ] 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

## 5. Security 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

## 6. Performance

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

## 7. Readability

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

## 8. Review notes


| File or line | Comment | Type | Resolved |
| --- | --- | --- | --- |
|  |  |  |  |
|  |  |  |  |
|  |  |  |  |
|  |  |  |  |
|  |  |  |  |
|  |  |  |  |

_Free template from Stegnor (stegnor.com/templates). Use it, change it and share it as you like._
