Skip to content

Code Review Analytics: What PR Data Tells About Team Health

Your PR data reveals team bottlenecks invisible in standups. Here's how to measure TTFR, review distribution, and cycle time with the REVIEW framework.

7 min read
Translucent review sheets and a magnifying lens reveal the path to a finished engineering component.
On this page

Last year, I worked with a team that was struggling with velocity. They had 8 engineers, a clean codebase, good test coverage, and a well-defined sprint process. On paper, everything was right. But they were shipping 40% less than comparable teams.

I pulled their PR data. The answer was right there.

Average time from PR open to first review: 26 hours. Average time from PR open to merge: 4.1 days. Average review cycles (rounds of feedback before approval): 2.8. One developer was responsible for 52% of all reviews.

The bottleneck wasn't the code. It wasn't the process. It was the review pipeline. One senior engineer had become the de facto gatekeeper, and everyone else waited for their review before merging anything.

We fixed the review distribution, and cycle time dropped to 1.4 days within a month. Same team. Same code. Same process. Just better data about how reviews were actually flowing.

The Metrics That Matter

Most teams track zero metrics about their code review process. Those that do track the wrong ones. "Number of PRs reviewed" is vanity. "Lines of code reviewed" is noise.

Here are the metrics I track and why: The code intelligence guide places these measurements alongside code structure. Apply the AI code review checklist when examining a change. Check the incentives with engineering metrics.

1. Time to First Review (TTFR)

The time between a PR being opened and receiving its first review comment. This is the single most impactful metric for engineering velocity.

Waiting for reviews can force developers to switch tasks and rebuild context later. Google's guidance recommends prompt responses while protecting an ongoing focused task, using natural breaks to review incoming changes.[1]

Target: Under 4 hours during business hours. If you can get to under 2 hours, you'll see a measurable jump in throughput.

2. PR Cycle Time

The time from PR open to PR merge. This encompasses review time, rework time, and any CI/CD delays.

PR cycle time covers the interval from opening the pull request to merging it. It excludes work before the PR and deployment after merge. Sequential PRs can accumulate waiting and rework, so inspect those intervals separately.

Target: Under 24 hours for standard PRs. Under 4 hours for bug fixes.

PR openedStart the clockFirst reviewResponse timeReworkReview cyclesPR mergedPR cycle time
Figure 1. Measure first response and the complete PR cycle separately.

3. Review Cycles (Iterations)

The number of back-and-forth rounds between author and reviewer before the PR is approved.

Why it matters: High iteration counts signal one of several problems:

  • Misalignment on standards (the author and reviewer disagree about what "good" looks like)
  • Insufficient upfront design (the approach is being debated in the review instead of before coding)
  • Unclear PR scope (the PR is doing too many things, making it hard to review)

Target: 1.5 or fewer average review cycles. If you're regularly above 2, investigate why.

4. Review Distribution (Gini Coefficient)

How evenly review work is spread across the team. A Gini coefficient of 0 means equal counts. For a finite team, its unnormalised maximum is (n - 1) / n when one person does all reviews. State whether your implementation normalises that maximum to 1.

Why it matters: Uneven review distribution creates bottlenecks (as in my opening example), burns out senior engineers, and prevents junior engineers from developing review skills.

Target: Gini coefficient below 0.3. This doesn't mean everyone reviews equally (seniors should review more), but no one person should account for more than 25% of reviews on a team of 6+.

5. PR Size

Measured in lines changed (additions + deletions) or files changed.

Google recommends small, self-contained changes because reviewers can understand them more easily. Its guidance gives examples of useful sizes while explicitly leaving the judgment to the reviewer. A universal 400-line cutoff is not established by that guidance.[2]

Target: Under 400 lines changed per PR. Under 10 files changed.

6. Review Comment Quality Ratio

The ratio of substantive comments (architecture, logic, security) to nitpick comments (formatting, naming, style).

Why it matters: If 80% of review comments are about formatting, your team is wasting time on things a linter should catch. Automate the nitpicks, and review time drops while review quality improves.

Target: At least 70% substantive comments. Automate everything else.

How to Collect the Data

GitHub

bash
# PR cycle time for a bounded sample merged in the last 30 days
cutoff=$(python3 -c 'from datetime import datetime, timedelta, timezone; print((datetime.now(timezone.utc) - timedelta(days=30)).date().isoformat())')
gh pr list --state merged --search "merged:>=$cutoff" --limit 100 --json number,createdAt,mergedAt,additions,deletions,changedFiles | \
  jq '.[] | {
    pr: .number,
    days: ((((.mergedAt | fromdateiso8601) - (.createdAt | fromdateiso8601)) / 86400) * 10 | floor / 10),
    lines: (.additions + .deletions),
    files: .changedFiles
  }'

# Review submissions on the bounded merged-PR sample above
# One developer may submit several reviews on a PR. This counts submissions.
gh pr list --state merged --search "merged:>=$cutoff" --limit 100 --json number --jq '.[].number' | \
  while IFS= read -r number; do
    gh api --paginate "repos/{owner}/{repo}/pulls/$number/reviews?per_page=100" \
      --jq '.[].user.login'
  done | sort | uniq -c | sort -rn

The GitHub example returns a capped merged-PR sample for the selected window. Review submissions are paginated separately, and the same person can submit more than one review on a PR.[3][4]

GitLab and Azure DevOps

Both platforms expose similar data through their APIs. The principle is the same: query merged MRs/PRs, calculate time deltas, and aggregate by reviewer.

Dedicated Tools

  • LinearB: Purpose-built for engineering metrics. Tracks DORA metrics plus review-specific data.
  • Appfire Flow (formerly Pluralsight Flow and GitPrime): Software engineering intelligence including review patterns.
  • Custom dashboards: For teams that want full control, a weekly script that queries the GitHub API and writes to a PostgreSQL database works well.

Sleuth's homepage, checked on 12 November 2026, describes governance for AI skills, rules and MCP servers. Appfire announced its acquisition of Flow from Pluralsight in February 2025.[5][6]

The Framework: REVIEW Health Score

I compute a composite health score for code review processes using six inputs:

R - Response time: Average TTFR. Score: 10 if <2h, 7 if <4h, 4 if <8h, 1 otherwise.

E - Efficiency: Average review cycles. Score: 10 if <1.5, 7 if <2, 4 if <3, 1 otherwise.

V - Volume balance: Review distribution Gini coefficient. Score: 10 if <0.2, 7 if <0.3, 4 if <0.5, 1 otherwise.

I - Input size: Average PR size in lines. Score: 10 if <200, 7 if <400, 4 if <800, 1 otherwise.

E - End-to-end time: Average cycle time. Score: 10 if <1d, 7 if <2d, 4 if <4d, 1 otherwise.

W - Worth (quality): Substantive comment ratio. Score: 10 if >80%, 7 if >60%, 4 if >40%, 1 otherwise.

Total score out of 60. Above 45 is healthy. 30-45 needs attention. Below 30 needs urgent intervention.

Response timeEfficiencyVolume balanceInput sizeEnd-to-endtimeWorth qualityTotal scoreSix inputs
Figure 2. Read all six REVIEW inputs before interpreting the total.

Common Anti-Patterns and Fixes

The Gatekeeper

Pattern: One senior developer reviews almost everything. Fix: Assign a "review buddy" to each PR based on code ownership, not seniority. Use CODEOWNERS files in GitHub to distribute automatically.

The Rubber Stamp

Pattern: PRs get approved with "LGTM" and no comments. Fix: Require at least one substantive comment per review. Some teams add a "I tested this by..." requirement.

The Mega-PR

Pattern: PRs regularly exceed 1,000 lines. Fix: Stacked PRs. Break the work into small, reviewable chunks that build on each other. Tools like Graphite and ghstack make stacked PRs practical.

The Stale PR

Pattern: PRs sit open for days, accumulating merge conflicts. Fix: Set up automated reminders. If a PR has no review after 4 hours, ping the assigned reviewer. If no reviewer is assigned, auto-assign based on CODEOWNERS.

The Bikeshed

Pattern: Reviews focus on naming, formatting, and style rather than logic and architecture. Fix: Automate formatting (Prettier), automate style (ESLint), automate import ordering (eslint-plugin-import). Remove human judgment from anything a tool can decide.

The Contrarian Take: Code Review Isn't About Finding Bugs

Microsoft's study of modern code review found benefits beyond defect detection, including knowledge transfer, team awareness and alternative solutions. It does not establish a universal percentage of defects that reviews catch.[7]

If you're relying on code review as your primary quality gate, you're building on a weak foundation. Tests, type checking, and static analysis catch more bugs more reliably than human reviewers.

So what is code review for? Knowledge transfer. When a developer reviews another developer's code, they learn about that part of the system. They see new patterns and techniques. They build a shared understanding of how the codebase should evolve.

This reframing changes how you design your review process. Instead of asking "Did the reviewer find bugs?", ask "Did the reviewer learn something?" Instead of assigning reviews to the most experienced developer, assign them to the developer who would benefit most from understanding the changed area.

Evaluate both knowledge sharing and defects after changing review assignments. Keep tests, type checks and static analysis in place, and use the results to judge whether the new process improves the team's work.

Start Tracking Today

Pull your PR data right now. It takes 10 minutes with the GitHub CLI commands above. Calculate your TTFR, cycle time, and review distribution.

I guarantee you'll find at least one surprise. Maybe it's a bottleneck you didn't know about. Maybe it's a team member who's silently drowning in review requests. Maybe it's a pattern of large PRs that's killing your review quality.

The data is sitting in your GitHub history, waiting to tell you something. Go look.

Frequently asked questions

How is review response time different from PR cycle time?

Response time ends at the first review response. PR cycle time continues until merge and can include rework and CI delays. Record both definitions so a faster first response cannot conceal a queue that remains slow to complete.

Does a short pull request always receive a better review?

A focused change is easier to understand, but line count alone does not determine review difficulty. Generated files, mechanical changes and changes spread across many files require different judgments. Keep the change self-contained and agree its scope with the reviewer.

How should review distribution be counted?

Choose whether to count review submissions, distinct reviewers per pull request or another explicitly defined unit. Exclude author self-reviews and separate bots when appropriate. Apply the same rule and time window when comparing periods.

Can the REVIEW score replace reading the pull requests?

The article's REVIEW score is a proposed diagnostic with author-selected thresholds. Use it to choose where to look next, then read delayed or repeatedly reworked changes. A composite score can hide a serious problem in one of its inputs.

Sources

  1. [1]Speed of Code Reviews · Google Engineering Practices
  2. [2]Small CLs · Google Engineering Practices
  3. [3]GitHub CLI · GitHub CLI
  4. [4]REST API endpoints for pull request reviews - GitHub Docs · GitHub Docs
  5. [5]Skills | Govern and Scale AI Across Your Organization | Sleuth · Sleuth
  6. [6]Appfire acquires Flow, a best-in-class SEI platform enabling data-driven insights for engineering organizations · Appfire, 5 February 2025
  7. [7]Expectations, Outcomes, and Challenges of Modern Code Review - Microsoft Research · Microsoft Research, 2013

Checked against these sources on

Related Articles