Back to prompts
Coding & Developmentintermediate
4.9

Senior Engineer Code Review

Get a thorough code review as if a senior engineer is looking at your PR — bugs, patterns, performance, and suggestions.

Copy & Paste this prompt
You are a senior software engineer with 15+ years of experience doing code reviews. Review my code as if it's a pull request.

Language/Framework: [LANGUAGE]
Context: [WHAT THIS CODE DOES]
Requirements: [WHAT IT SHOULD DO]

Review for:

1. **CORRECTNESS** — Bugs, edge cases, logic errors
   - Will this break with null/undefined/empty inputs?
   - Are there race conditions or concurrency issues?
   - Off-by-one errors?

2. **SECURITY** — Vulnerabilities
   - SQL injection, XSS, CSRF risks?
   - Secrets exposure?
   - Input validation gaps?

3. **PERFORMANCE** — Efficiency
   - Time/space complexity (Big O)
   - N+1 queries?
   - Unnecessary re-renders (if frontend)?
   - Memory leaks?

4. **MAINTAINABILITY** — Clean code
   - Naming clarity
   - Function length and responsibility
   - DRY violations
   - Missing error handling

5. **OVERALL VERDICT**
   - ✅ Approve / 🔄 Request Changes / ❌ Reject
   - Priority fixes (must fix before merge)
   - Suggestions (nice to have)
   - Refactored version of the worst section

Be direct. I want honest feedback, not encouragement.

Here's my code:
```
[PASTE YOUR CODE HERE]
```
#code-review#best-practices#security#clean-code#debugging

Works with

chatgptclaudegemini

💡 Pro Tips

  • Include the full file, not just the changed lines — context matters
  • Mention the requirements so the AI can check correctness
  • Run this on your code BEFORE submitting the PR

🧠 Why This Works

Senior engineers catch issues that automated tools miss—subtle race conditions, architectural anti-patterns, and maintainability concerns. This prompt replicates that experienced reviewer mindset, examining code through multiple lenses simultaneously.

📅 When to Use This Prompt

Use when you don't have access to a senior engineer for code review, when reviewing your own code before submitting a PR, or when you want a thorough review covering security, performance, and clean code principles.

🎯 What You'll Get

You'll receive a detailed review with findings categorized by severity (critical/high/medium/low), specific line-level feedback, suggested refactoring approaches, security concerns, and performance implications—exactly like a senior engineer's PR comments.

🔗 Related Prompts

Coding & DevelopmentPremium

Legacy Code Refactoring Roadmap

Create a safe, step-by-step refactoring plan for messy legacy code without breaking production.

refactoringlegacy-codecode-quality
4.7
advanced
Coding & DevelopmentPremium

Complete Test Suite Generator

Generate comprehensive unit, integration, and edge case tests for your code — with 90%+ coverage.

testingunit-teststdd
4.8
intermediate
Coding & DevelopmentPremium

Application Performance Profiler

Profile and optimize application performance bottlenecks with a prioritized optimization plan.

performanceoptimizationprofiling
4.7
advanced