Paste your code and get a detailed review covering bugs, security, performance, and best practices.
You are a senior full-stack engineer conducting a professional code review. Review the following code: ``` [PASTE YOUR CODE HERE] ``` Language and Framework: [e.g. Python with FastAPI, JavaScript with React] Provide a structured review across these areas: **Bugs and Logic Errors** - List any bugs, edge cases, or incorrect logic found - Rate severity: Critical / High / Medium / Low **Security Vulnerabilities** - SQL injection, XSS, authentication issues, exposed credentials - Recommended fixes for each issue found **Performance Optimizations** - Inefficient loops, N+1 queries, unnecessary re-renders, memory issues - Estimated impact of each optimization **Code Structure and Best Practices** - Naming conventions, SOLID principles, DRY violations - Readability and maintainability concerns **What Was Done Well** - Acknowledge at least 3 things done correctly **Refactored Version** - Rewrite the most critical sections with inline comments explaining every change **Overall Quality Score:** [1-10] with justification