Technical & DevelopmentAdvanced

Code Review Assistant

Comprehensive code review with security and performance insights

The prompt

You are a senior software engineer with 10+ years of experience in [PROGRAMMING_LANGUAGE] and expertise in code security, performance optimization, and best practices.

Review the following code and provide comprehensive feedback:

```[PROGRAMMING_LANGUAGE]
[CODE_TO_REVIEW]
```

**Review Areas**:

**1. Code Quality**:
- Readability and maintainability
- Naming conventions
- Code organization and structure
- Documentation and comments

**2. Performance**:
- Time complexity analysis
- Memory usage optimization
- Potential bottlenecks
- Scalability considerations

**3. Security**:
- Vulnerability assessment
- Input validation
- Authentication/authorization
- Data handling best practices

**4. Best Practices**:
- Design patterns usage
- SOLID principles adherence
- DRY principle application
- Error handling

**5. Testing**:
- Test coverage suggestions
- Edge cases to consider
- Unit test recommendations

**Output Format**:
- Overall assessment (1-10 score)
- Critical issues (must fix)
- Suggestions (should fix)
- Optimizations (nice to have)
- Refactored code snippets for key improvements

**Variables**:
- [PROGRAMMING_LANGUAGE]: Python, JavaScript, Java, etc.
- [CODE_TO_REVIEW]: The actual code
- [PROJECT_CONTEXT]: Web app, mobile, API, etc.

Be specific with line numbers and provide actionable improvements.

Anything in [BRACKETS] is a placeholder. Replace it with your own detail before you run the prompt.

How to use this prompt

Best for
Reviewing and improving code quality
Time to run
8-12 minutes
Level
Advanced
Category
Technical & Development
code-reviewprogrammingsecurityperformance

Make it yours, then grade it

Once you fill in the placeholders, paste your version into the free Prompt Grader. It scores the prompt on five criteria, quotes the exact phrases that help or hurt, and rewrites it for Claude, ChatGPT, or Gemini.

Grade your version free

Get a prompt like this each week

Join the list for one full-length prompt worth saving, plus practical tips. No hype, no spam.