Code Review Best Practices
16 items · Technical · Medium difficulty · 30 min
Quick, practical code review checklist for reviewers and authors.
-
Run the code and verify functionality
Execute key flows or demo scenarios to confirm expected behavior
-
Run the test suite and confirm all tests pass
Run local and CI tests (unit, integration) to catch regressions
-
Add or update unit tests for new logic
Cover success and failure paths for changed units
-
Add integration or end-to-end tests for user flows
Exercise cross-component interactions and workflows
-
Confirm tests cover edge cases and error conditions
Include boundary values, timeouts, and invalid inputs
-
Verify input validation and sanitize external data
Check types, ranges, required fields, and normalization
-
Review code for SQL injection vulnerabilities
Prefer parameterized queries; avoid string concatenation
-
Review code for XSS and insecure output encoding
Escape/encode HTML and use safe templating APIs
-
Confirm authentication and authorization checks are enforced
Verify permission checks before sensitive actions or data access
-
Check naming clarity for functions, variables, and classes
Prefer descriptive, consistent names and avoid abbreviations
-
Ensure code follows DRY; extract duplicated logic
Refactor repeated code into shared functions or helpers
-
Assess algorithmic complexity in hot paths
Spot N^2 or worse algorithms and consider improvements
-
Identify obvious performance bottlenecks and optimize
Look at loops, database queries, allocations, and network calls
-
Verify error handling and logging are clear and safe
Provide meaningful errors and avoid leaking secrets in logs
-
Update documentation and add inline comments where needed
Explain why code exists and update README or changelogs
-
Provide constructive, specific review comments with suggested fixes
Be respectful, cite examples, and propose actionable improvements
Printed from TickYouOff — the interactive version tracks your progress and can be shared with others.