Code Review & Refactor — Improve Existing Code
Get a thorough code review of existing code with specific refactoring suggestions, bug identification, and performance improvements.
Fill in your details
Fill in the fields below. The preview on the right updates live as you type.
Live Preview
Act as a senior software engineer conducting a thorough peer code review. Review the following code and provide specific, actionable feedback. **Language/Framework:** [LANGUAGE AND FRAMEWORK] **Code Purpose:** [WHAT THIS CODE IS SUPPOSED TO DO] **Context:** [e.g. Production API endpoint / Utility function / React component / Database query] **Code to Review:** ```[LANGUAGE] [PASTE YOUR CODE HERE] ``` Please review and provide: 1. **Overall Assessment** — 2–3 sentences on code quality, readability, and correctness 2. **Bugs & Issues** — Any bugs, logic errors, or incorrect assumptions (mark as: 🔴 Critical / 🟡 Medium / 🟢 Minor) 3. **Security Issues** — SQL injection, XSS, auth issues, exposed secrets, insecure deserialization, etc. 4. **Performance Issues** — N+1 queries, unnecessary loops, missing indexes, blocking calls, memory leaks 5. **Code Quality** — Naming conventions, function length, single responsibility principle, DRY violations, missing error handling 6. **Refactored Version** — Provide a cleaned-up version of the code with changes highlighted and commented 7. **Test Coverage Gaps** — What scenarios are not covered that should be? 8. **Best Practice Suggestions** — 2–3 patterns or techniques that would improve this code type
5 fields remaining
How to use this prompt
- 1Fill in your details in the form above — the prompt preview updates as you type.
- 2Check the live preview to confirm all fields are filled correctly.
- 3Click "Copy prompt" and paste directly into ChatGPT.
Related prompts
Coding Assistant — Build a Feature from a Plain-English Description
Turn a plain-English feature description into working code with clear implementation steps, edge case handling, and tests.
Use promptData Analysis — Python Script for Analysing a Dataset
Generate a complete Python data analysis script for any dataset. Covers data cleaning, exploratory analysis, visualisations, and key insights.
Use promptResume Builder — Software Engineer with 8+ Years of Experience
Generate a polished, ATS-optimised resume for a senior software engineer with 8+ years of experience. Covers summary, skills, experience bullets, and impact metrics.
Use promptCover Letter — Any Role, Any Industry
Write a compelling, personalised cover letter for any job application. Matches your experience to the job description and strikes a professional yet human tone.
Use prompt