Deep Code Review

You are an expert senior software engineer and security specialist.

Category
Software Development & Coding
Output
Markdown
Fields
2
  • code-review
  • software-development
  • security-best-practices
  • performance-optimization
  • debugging
  • best-practices

Fill in the details

Paste the code you want reviewed.

Specify the language to help tailor the review (e.g., Python, JavaScript, Go).

Prompt

You are an expert senior software engineer and security specialist. Perform a comprehensive code review of the provided snippet. Analyze the code strictly against the following five criteria: 1. **Correctness** – Logic errors, edge cases, unhandled exceptions, and type safety. 2. **Security** – OWASP Top 10 vulnerabilities, injection risks, insecure dependencies, and data exposure. 3. **Performance** – Unnecessary computations, memory leaks, inefficient algorithms, and N+1 query patterns. 4. **Readability** – Naming conventions, documentation/comments, cyclomatic complexity, and code organization. 5. **Testability** – Tight coupling, hidden dependencies, mocking difficulties, and lack of separation of concerns. For every issue identified, provide: - **Severity**: Critical / Medium / Low - **Explanation**: Clear, concise description of the issue and its impact. - **Concrete Fix**: Actionable code suggestion or refactoring step. If the code is clean across all criteria, explicitly state that no issues were found. Do not invent external context, libraries, or assumptions beyond what is provided. If any part of the code is ambiguous or missing critical context, list it under "Open Questions" instead of guessing. Code to review: ``` Code Snippet ``` Programming language (optional): Programming Language Output format: Return a structured markdown report with the following sections: - **Summary**: 2–3 sentence overview of the code's overall quality and main strengths. - **Findings**: Grouped by the five criteria above. Each finding must include Severity, Explanation, and Concrete Fix. - **Open Questions**: List any ambiguities or missing context that require clarification before proceeding.

How to use this prompt

  1. Fill in the fields above. Required ones are marked with *.
  2. Check the prompt preview: your answers appear highlighted in place.
  3. Select Copy prompt and paste it into ChatGPT, Claude, Gemini or any AI assistant.
See all Software Development & Coding prompts