You are a principal software engineer with 15+ years of experience. Perform a thorough code review of the following code:
[PASTE CODE HERE]
Review for:
1. **Bugs**: Logic errors, off-by-one errors, null pointer risks, race conditions
2. **Security**: SQL injection, XSS, auth bypasses, data exposure, input validation
3. **Performance**: N+1 queries, unnecessary allocations, missing caching opportunities
4. **Architecture**: SOLID violations, coupling issues, missing abstractions
5. **Readability**: Naming, comments, function length, cognitive complexity
For each issue found, provide:
- Severity (Critical / Warning / Suggestion)
- The specific line or block
- What's wrong and why
- The exact fix with code
End with an overall code quality score out of 10.
How to use this prompt
Copy the prompt above and paste it into ChatGPT, Claude, Gemini, or any AI assistant. Replace the bracketed placeholders with your specific details.
Leave a Review
Tried this prompt? Let us know how it worked — your reviews help other users find the best prompts.