How to Do a Code Review (Even If You're Junior)
Code review is one of the most valuable practices in software development. It catches bugs before they reach production, spreads knowledge across the team, and raises the quality bar for everyone. But if you're a junior developer — or just new to a codebase — the idea of reviewing someone else's code can feel intimidating.
Here's the truth: you don't need to be a senior engineer to give a useful code review. Some of the most helpful review comments come from people who are less familiar with the code, because they spot the things that experts overlook (like confusing naming, missing context, or unclear flow).
This guide will give you a practical framework for reviewing code at any experience level.
What to Look For: The Checklist
Use this checklist every time you review a pull request. You don't need to cover every item for every PR — focus on what's relevant.
Correctness
- [ ] Does the code do what the PR description says it should?
- [ ] Are there edge cases that aren't handled? (empty arrays, null values, negative numbers)
- [ ] Could any inputs cause unexpected behavior?
Readability
- [ ] Can you understand what the code does without the author explaining it?
- [ ] Are variable and function names descriptive?
- [ ] Is the code organized logically?
- [ ] Are there comments where the logic isn't obvious?
Simplicity
- [ ] Is there duplicated code that could be extracted?
- [ ] Are there unnecessary abstractions or over-engineered solutions?
- [ ] Could any complex logic be simplified?
Tests
- [ ] Are there tests for the new functionality?
- [ ] Do the tests cover edge cases and error scenarios?
- [ ] Are the test descriptions clear about what they're testing?
Security
- [ ] Is user input validated and sanitized?
- [ ] Are there any hardcoded secrets, keys, or passwords?
- [ ] Is data properly escaped before being rendered or stored?
Performance
- [ ] Are there any obvious N+1 queries or unnecessary loops?
- [ ] Could any operations be batched?
- [ ] Are large datasets paginated?
Tips for Junior Developers
1. It's OK to Ask Questions
The most powerful tool in a junior reviewer's toolkit is the question. If you don't understand why something was done a certain way, ask:
> "I'm not familiar with this pattern — could you explain why you chose to use a factory here instead of direct construction?"
This isn't a sign of weakness. It's useful feedback. If the code needs explanation, it might need a comment. And your question might reveal that the author didn't have a strong reason for the choice.
2. Focus on What You CAN Review
You might not be able to evaluate the database query optimization, but you can absolutely review:
- Naming: Are the variables and functions well-named?
- Readability: Can you follow the logic?
- Tests: Do the test descriptions make sense?
- Documentation: Is the PR description clear?
- Consistency: Does the code match the patterns used elsewhere in the project?
3. Read the PR Description First
Before looking at the code, read the PR description. Understand what the change is supposed to do and why. This context makes the code much easier to follow. If the PR description is missing or unclear, that's valid review feedback itself.
4. Use Tools to Build Understanding
When you encounter unfamiliar code in a review, use tools to bridge the gap. Run the code locally if possible. Use your IDE's "go to definition" to trace how functions connect. Tools like ExplainThisCode can help you quickly understand what a complex function does, so you can focus your review on whether it does it correctly rather than spending all your time deciphering the logic.
5. Review in Small Batches
Don't try to review a 500-line PR in one sitting. Research shows that review effectiveness drops sharply after about 400 lines. If a PR is large, review it in chunks — file by file, or feature by feature.
Common Code Review Anti-Patterns
Avoid these — they make reviews less useful and damage team dynamics.
Nitpicking Style
Don't leave ten comments about bracket placement or semicolons. That's what linters and formatters are for. If the team doesn't have auto-formatting set up, suggest adding it once — don't enforce it manually in every review.
Rubber Stamping
Approving without actually reading the code helps no one. If you don't have time to review properly, say so. A delayed review is better than a fake one.
Rewriting Someone's Code
Your job as a reviewer is to flag issues, not to rewrite the PR your way. If the code works and is clear, the fact that you would have structured it differently is not a valid objection.
Being Vague
"This doesn't look right" is not helpful. Be specific: "This filter runs on every render because the dependency array is missing userId. Should it be memoized?"
Gatekeeping
Some reviewers use code review as a power move, blocking PRs over trivial issues or personal preferences. Good review is collaborative. The goal is to ship better code, together.
How to Write Good Review Comments
Be specific. Point to the exact line and explain likely consequences.
> "On line 42, items.find() returns undefined if no match is found, but the next line calls .name on the result without checking. This will throw if the item isn't found."
Distinguish importance. Use prefixes to signal whether something is blocking or optional:
- blocker: This must be fixed before merging.
- suggestion: Consider this, but it's not a dealbreaker.
- nit: Minor style or preference thing, feel free to ignore.
- question: Genuinely asking, not requesting a change.
Offer alternatives. Don't just say "this is wrong." Show what you'd suggest instead, or ask the author what they think about an alternative approach.
Receiving Code Reviews
Reviewing is a two-way street. When you're the one receiving feedback:
- Don't take it personally. The comments are about the code, not about you.
- Assume good intent. Most reviewers are trying to help.
- Ask for clarification. If you don't understand a suggestion, ask.
- Push back respectfully. If you disagree, explain your reasoning. Good teams debate constructively.
Key Takeaway
Code review is a skill, and like any skill, you get better with practice. Start with the checklist above, focus on what you can evaluate, ask questions freely, and remember: the best review comment is the one that prevents a bug from reaching production. Your fresh perspective as someone newer to the codebase is a feature, not a bug.