# bmitch/churn-php

Discover files in need of refactoring.

Repository: https://github.com/bmitch/churn-php
Canonical: https://ross.abutalabs.com/products/churn-php
Language: PHP
License: MIT
License Family: permissive
Topics: php, identify-files, refactor, complexity, continuous-integration, clean-code
Last push: 2025-12-31T12:03:13+00:00

## Health v2 (maintenance only)
Score: 58/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 60, release rhythm 32, longevity 100
- inputs: {"age_days": 3371, "days_push": 245, "days_rel": 243, "gap_med": null, "n_releases_24m": 1}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1377, forks 60 (observed 2026-08-28T04:04:33.463087+00:00)

## What it is
churn-php is a PHP command-line tool that identifies files in a project that are good candidates for refactoring. It scores each PHP file by combining its git commit frequency with its cyclomatic complexity and displays the results in a table.

## Use cases
- find php files that need refactoring
- identify high-churn high-complexity files in my codebase
- measure cyclomatic complexity of php files
- add code quality checks to continuous integration
- prioritize technical debt cleanup in a php project
- find which files change most often in git

## When to choose
- you maintain a PHP 7.1+ codebase and want to prioritize refactoring efforts
- you want a simple CI-integrated score combining git churn and complexity
- you prefer a standalone phar or Composer dev dependency

## When to avoid
- your project is not written in PHP
- you need full static analysis or automated fixes rather than refactoring hints
- you expect the tool to decide what to refactor for you - it only assists judgment

## Facets
- artifact type: cli-tool
- maturity: active
- function: developer-tools, cli, code-review, testing
- domain: developer-tools
- platform: cli, cross-platform, php
- tags: static-analysis, cyclomatic-complexity, code-quality, refactoring, technical-debt, clean-code, continuous-integration, command-line, php

## Member repositories
- bmitch/churn-php (main) score 58

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:33.463087+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:40:25.638471+00:00, confidence not recorded.
  - readme: https://github.com/bmitch/churn-php (fetched 2026-08-28T04:04:33.463087+00:00, sha 87893ed4cbbd)
- Data as of 2026-08-30T08:39:29.467469+00:00.
