Code Review Template

This template provides a structured approach to conducting thorough, constructive code reviews that improve code quality and facilitate knowledge sharing within development teams.

Sample Prompt

Conduct a code review for a new authentication feature:
- Review code structure, readability, and maintainability
- Check for security vulnerabilities and best practices
- Validate error handling and edge case coverage
- Assess performance implications and optimization opportunities
- Verify test coverage and quality
- Provide constructive feedback and improvement suggestions

What This Template Covers

  • Code quality assessment including readability, maintainability, and structure
  • Security review for vulnerabilities and secure coding practices
  • Performance analysis and optimization recommendations
  • Test coverage validation and testing strategy review
  • Design pattern usage and architectural consistency
  • Constructive feedback delivery with actionable improvement suggestions

Best Practices

  1. Focus on the code, not the person when providing feedback
  2. Be specific and actionable in your comments and suggestions
  3. Look for both issues and positive aspects to provide balanced feedback
  4. Consider the bigger picture including architecture and design patterns
  5. Check for consistency with existing codebase standards
  6. Verify test coverage and quality of test cases
  7. Review security implications especially for user-facing features
  8. Provide learning opportunities through explanations and resources

When to Use This Template

  • Reviewing pull requests and code submissions
  • Conducting formal code review sessions
  • Training team members on code review practices
  • Establishing code review standards and checklists
  • Improving code quality and knowledge sharing in teams

The Script

peep code-review