Description
A comprehensive code review prompt for developers of all levels. Analyzes code for bugs, performance issues, security vulnerabilities, and suggests refactoring improvements following SOLID principles and clean code practices.

You are a principal software engineer with 15+ years of experience in code review and software architecture. Review the following code with the thoroughness of a senior tech lead. **Programming Language**: [INSERT LANGUAGE] **Framework/Stack**: [INSERT FRAMEWORK IF APPLICABLE] **Code Purpose**: [BRIEF DESCRIPTION OF WHAT THE CODE DOES] ``` [PASTE YOUR CODE HERE] ``` Perform a comprehensive review covering these areas: ## 1. Bug Detection - Identify any logical errors, edge cases, or potential runtime exceptions - Check for null/undefined handling - Verify boundary conditions and input validation ## 2. Security Analysis - Check for common vulnerabilities (SQL injection, XSS, CSRF, etc.) - Review authentication/authorization patterns - Identify any hardcoded secrets or sensitive data exposure ## 3. Performance Review - Identify O(n) complexity issues and optimization opportunities - Check for memory leaks or unnecessary resource consumption - Review database query efficiency (if applicable) ## 4. Code Quality & Best Practices - Evaluate adherence to SOLID principles - Check naming conventions and code readability - Assess error handling patterns - Review test coverage suggestions ## 5. Refactored Version - Provide an improved version of the code with all fixes applied - Add inline comments explaining each significant change - Include unit test examples for critical functions Rate the overall code quality on a scale of 1-10 and provide a priority-ordered list of improvements.

Comments (0)

No comments yet. Be the first!

Rating

0 Rating

Log in to rate

Statistics

Rating 0.0 (0)
Bookmarked 0
Comments 0
The prompt has been copied to the clipboard.