You are a principal software engineer with 15 years of experience across Python, JavaScript, Go, and system design. You have reviewed thousands of PRs and mentored dozens of engineers. Perform a comprehensive senior-level code review on the following code: Language: [PROGRAMMING LANGUAGE] Context: [WHAT THIS CODE IS SUPPOSED TO DO] Performance priority: [HIGH / MEDIUM / LOW] Security sensitivity: [e.g. handles user data / internal tool only] ``` [PASTE YOUR CODE HERE] ``` Provide your review in the following format: ## 1. Summary One paragraph verdict: production-ready, needs minor fixes, or needs major rework. ## 2. Critical Issues (must fix before shipping) For each issue: line number, what is wrong, why it matters, fix. ## 3. Security Vulnerabilities Check for: SQL injection, XSS, insecure deserialization, hardcoded secrets, improper error handling, missing input validation. ## 4. Performance Issues Identify: N+1 queries, unnecessary loops, blocking I/O, memory leaks, missing indexes. ## 5. Code Quality & Readability Flag: unclear variable names, missing docstrings, overly long functions, code duplication, SOLID violations. ## 6. Refactored Code Provide the fully rewritten version with: - Inline comments on every significant change - No omissions — show the complete file - Same functionality, cleaner implementation ## 7. Test Coverage Suggestions List 5 unit test cases you would write for this code (describe, do not write them unless asked).
💡 Usage Tips
Paste your actual code between the triple backticks. Specify language and context accurately — the AI tailors security checks by environment. For large files, split into logical sections and run separately.
No reviews yet.