Code review is one of the cheapest practices for improving the quality of a system, and also one of the most distorted: it either becomes a formality where everything is approved with a quick thumbs-up, or a bottleneck where changes wait for days. This guide proposes a useful middle ground.
Short answer: A good code review combines small changes, an automated pipeline that has already validated style and tests, and human reviewers focused on purpose, design, logic and security. With a commitment to respond in under one business day, code review improves quality without becoming a bottleneck.
What is code review for?
Code review is the practice in which one or more people other than the author examine a change before it is merged, to detect errors, keep things consistent and share knowledge.
Beyond catching bugs, a good review:
- Detects logic problems and edge cases the author did not see.
- Keeps a consistent style and architecture.
- Spreads knowledge: at least two people know each change.
- Helps train whoever joins the team.
- Prevents a single person from being the sole owner of a part of the system.
What should you review in a code review, and in what order?
Reviewing in an orderly way avoids wasting time on details while the big problems slip through.
- Purpose: does the change solve what was asked? Does it do anything else it shouldn't?
- Design: does it fit the architecture? Does it add unnecessary complexity?
- Correctness: does it handle edge cases, errors and empty values?
- Security: does it validate inputs? Does it respect permissions? Does it expose personal data?
- Tests: are there relevant tests? Would they fail if the code were wrong?
- Readability: clear names, small functions, comments where the why is not obvious.
- Performance: only where it matters, such as queries inside loops or bulk loads.
Style and formatting should not be debated in review: delegate them to automated tools.
What to automate so people review what matters
- Code formatting and style.
- Static analysis for common errors.
- Automated tests on every change.
- Scanning for secrets and vulnerable dependencies.
- Checking that the change has a description.
If the pipeline has already approved all of that, the person focuses on design and business logic.
| The machine reviews | The person reviews |
|---|---|
| Formatting and style | Purpose of the change |
| Common errors via static analysis | Design and architecture |
| Automated tests | Edge cases and business logic |
| Secrets and vulnerable dependencies | Security and permissions |
To set up that first automated line, see the guide to CI/CD for small businesses and the one on automated testing.
How do you keep review from becoming a bottleneck?
Small changes
This is the most effective rule. A 100-line change can be reviewed well in twenty minutes; a 1,500-line one gets approved without reading. Split the work into steps that can be understood separately.
Time agreements
Define a commitment, for example responding to a review in under one business day. It is a team policy, visible on the board.
Clear description
Whoever submits the change explains what it does, why, how to test it and which decisions they were unsure about. A good description saves half the review.
Rotating reviewers
Avoid having everything depend on the most senior person. Rotating spreads both the load and the knowledge.
How do you give and receive comments in a review?
- Comment on the code, not on the person.
- Ask questions instead of making statements when you are unsure: what happens if this list comes in empty?
- Distinguish what is mandatory from what is optional, for example by labeling minor suggestions.
- Explain the why, not just the what.
- Acknowledge what is well done; that is part of the review too.
- Whoever receives comments doesn't take them as an attack; the goal is the product.
How do you review AI-written code?
Code generated by assistants and agents requires the same review, and sometimes more attention:
- It looks polished even when it is wrong. Impeccable style can hide logic errors.
- Verify that it understands the business context. It may assume rules that don't exist.
- Review the generated tests. Make sure they check real behavior and don't just repeat the implementation.
- Look for new dependencies that are unnecessary or unreliable.
- Watch for sensitive data: no keys, real data or logs with personal information left behind.
- The human author answers for it. Whoever submits the change must be able to explain it; if they don't understand it, it isn't ready.
If your team delegates entire tasks to assistants, also read how coding agents are changing development.
An example of a useful comment
Instead of saying "this is wrong," an effective comment says: if the customer has no phone number on file, this line would throw an error when formatting the number; should we validate first or return an empty value? It describes the case, points out the risk and opens the conversation. The person receiving the comment understands what to fix and why, and the review improves both the code and the team's relationships.
Common mistakes
- Approving out of trust in the author without reading.
- Reviewing only style and overlooking logic.
- Leaving changes waiting for days and then requesting late corrections.
- Long discussions in comments that are better resolved in a five-minute call.
- Demanding perfection instead of good-enough improvement.
- Not measuring: if the waiting time grows, you need to see it.
A short list to get started
- Changes under 300 lines whenever possible.
- A green pipeline before asking for review.
- A description with purpose and how to test.
- At least one reviewer, two in critical areas.
- A response in under one business day.
- A monthly retrospective: which errors slipped past us and how do we catch them earlier?
When it makes sense and when it doesn't
It makes sense whenever more than one person works on the code, and especially when AI is used. If you work alone, ask someone outside for a periodic review of the critical parts, or use your own checklists. What doesn't make sense is a heavy, bureaucratic review for trivial changes: adjust the rigor to the risk.
Frequently asked questions
How many lines should a change have to be reviewed well?
There is no exact limit, but as a rough reference, changes of a few hundred lines get reviewed with care and those over a thousand tend to be approved without reading. Ideally you split the work into steps that can be understood separately, each with its own description and tests.
Who should do code review in a small team?
At least one person other than the author, rotating to spread load and knowledge. In critical areas, such as payments or permissions, it is worth adding a second one. If you work alone, ask someone outside for a periodic review of critical parts and rely on checklists and automated analysis.
How long should a code review take?
As a team policy, responding in under one business day is a reasonable agreement, and the review itself of a small change takes about twenty minutes. If changes wait for days, there is a bottleneck: check the size of the changes, the reviewers' workload and make waiting time visible on the board.
What do I do when there is disagreement in a review?
Distinguish what is mandatory from what is optional and look for an objective criterion: an edge case that fails, a standard agreed by the team or a test. If the discussion drags on in comments, resolve it in a five-minute call. If it persists, the person responsible for the module decides and the decision is recorded.
Let's talk
At DaltoAura we review every change before merging it, and we can help you organize this process in your team. Tell us about your case and we will reply with clear proposals.