PHPackages                             smmccabe/phpdebt - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. smmccabe/phpdebt

ActiveProject[Utility &amp; Helpers](/categories/utility)

smmccabe/phpdebt
================

App that uses a few code health tools to give an estimated technical debt score.

1.1.0(3y ago)205619[2 issues](https://github.com/smmccabe/phpdebt/issues)[2 PRs](https://github.com/smmccabe/phpdebt/pulls)GPL-3.0-or-laterPHP

Since Jun 23Pushed 3y ago2 watchersCompare

[ Source](https://github.com/smmccabe/phpdebt)[ Packagist](https://packagist.org/packages/smmccabe/phpdebt)[ RSS](/packages/smmccabe-phpdebt/feed)WikiDiscussions master Synced 5d ago

READMEChangelog (5)Dependencies (6)Versions (16)Used By (0)

phpdebt
=======

[](#phpdebt)

PHP Technical Debt Calculator

It scans through your code looking for any faults based on a number of standards from existing code analysis tools, it totals up the number of faults it finds and compares them against the total lines of functional code (comments and whitespace are excluded) and gives a quality score.

Currently works primarly against Drupal

Installation
------------

[](#installation)

```
wget https://github.com/smmccabe/phpdebt/releases/download/1.0.2/phpdebt.phar
chmod +x phpdebt.phar
sudo mv phpdebt.phar /usr/local/bin/phpdebt

```

Usage and Examples
------------------

[](#usage-and-examples)

Against a whole project

```
phpdebt .

```

Against a specific folder

```
phpdebt src/

```

Against a specific file

```
phpdebt src/MyClass.php

```

Against wildcards

```
phpdebt src/*.inc

```

Sample output

```
phpdebt .
phpmd cleancode: 145
phpmd codesize: 19
phpmd design: 2
phpmd naming: 35
phpmd unusedcode: 43
phpcs Drupal: 39
phpcs DrupalPractice: 69
Total Faults: 352
Total Lines: 10568
Quality Score: 3 faults per 100 lines

```

### Score Guidelines

[](#score-guidelines)

Faults per 100 lines:

- **&lt; 2** - Excellent Code
- **&lt; 6** - Good Code
- **&lt; 10** - Decent Code
- **&lt; 25** - Needs work, cleanup should be prioritized of most feature work
- **&gt;= 25** Needs significant work, cleanup should be prioritized over any feature work or bugfixes.

### Fixing Found Faults

[](#fixing-found-faults)

phpdebt does not currently provide a verbose mode, to identify and fix specific faults, it is recommended to run tools such as phpmd and phpcs directly, see the phpdebt script if you wish to replicate what phpdebt is running. A verbose mode will be added in the future.

Bugs or Issues
--------------

[](#bugs-or-issues)

Please post any bugs, issues or support requests to the [github issue board](https://github.com/smmccabe/phpdebt/issues)

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor1

Top contributor holds 96.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~120 days

Recently: every ~340 days

Total

15

Last Release

1207d ago

Major Versions

0.4.0 → 1.0.02020-04-22

### Community

Maintainers

![](https://www.gravatar.com/avatar/2537e31e9c033023dc21a2bc38670fb00666efba1f2eede7ca1e32ee04301fcb?d=identicon)[smmccabe](/maintainers/smmccabe)

---

Top Contributors

[![smmccabe](https://avatars.githubusercontent.com/u/4956338?v=4)](https://github.com/smmccabe "smmccabe (29 commits)")[![cobenash](https://avatars.githubusercontent.com/u/9973326?v=4)](https://github.com/cobenash "cobenash (1 commits)")

### Embed Badge

![Health badge](/badges/smmccabe-phpdebt/health.svg)

```
[![Health](https://phpackages.com/badges/smmccabe-phpdebt/health.svg)](https://phpackages.com/packages/smmccabe-phpdebt)
```

###  Alternatives

[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

728272.9k20](/packages/civicrm-civicrm-core)[ec-europa/toolkit

Toolkit packaged for Drupal projects based on Robo.

38244.6k16](/packages/ec-europa-toolkit)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)[jdlabails/php-project-analyzer-bundle

Symfony Bundle for PhpProjectAnalyzer

1210.8k](/packages/jdlabails-php-project-analyzer-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
