2017 © Pedro Peláez
 

library phpdebt

A technical debt calculator for PHP

image

smmccabe/phpdebt

A technical debt calculator for PHP

  • Thursday, July 12, 2018
  • by smmccabe
  • Repository
  • 1 Watchers
  • 2 Stars
  • 20 Installations
  • Shell
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 10 Versions
  • 0 % Grown

The README.md

phpdebt

PHP Technical Debt Calculator, (*1)

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., (*2)

Currently works primarly against Drupal, (*3)

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

Against a whole project, (*4)

phpdebt .

Against a specific folder, (*5)

phpdebt src/

Against a specific file, (*6)

phpdebt src/MyClass.php

Against wildcards, (*7)

phpdebt src/*.inc

Sample output, (*8)

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

Faults per 100 lines: * < 2 - Excellent Code * < 6 - Good Code * < 10 - Decent Code * < 25 - Needs work, cleanup should be prioritized of most feature work * >= 25 Needs significant work, cleanup should be prioritized over any feature work or bugfixes., (*9)

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., (*10)

Bugs or Issues

Please post any bugs, issues or support requests to the github issue board, (*11)

The Versions

12/07 2018

dev-master

9999999-dev

A technical debt calculator for PHP

  Sources   Download

GPL-3.0-or-later

The Requires

 

by Shawn McCabe

12/07 2018

0.2.1

0.2.1.0

A technical debt calculator for PHP

  Sources   Download

GPL-3.0-or-later

The Requires

 

by Shawn McCabe

03/07 2018

0.2.0

0.2.0.0

A technical debt calculator for PHP

  Sources   Download

GPL-3.0-or-later

The Requires

 

by Shawn McCabe

28/06 2018

0.1.6

0.1.6.0

A technical debt calculator for PHP

  Sources   Download

GPL-3.0-or-later

The Requires

 

by Shawn McCabe

27/06 2018

0.1.5

0.1.5.0

A technical debt calculator for PHP

  Sources   Download

GPL-3.0-or-later

The Requires

 

by Shawn McCabe

23/06 2018

0.1.4

0.1.4.0

A technical debt calculator for PHP

  Sources   Download

GPL-3.0-or-later

The Requires

 

by Shawn McCabe

23/06 2018

0.1.3

0.1.3.0

A technical debt calculator for PHP

  Sources   Download

GPL-3.0-or-later

The Requires

 

by Shawn McCabe

23/06 2018

0.1.2

0.1.2.0

A technical debt calculator for PHP

  Sources   Download

GPL-3.0-or-later

The Requires

 

by Shawn McCabe

23/06 2018

0.1.1

0.1.1.0

A technical debt calculator for PHP

  Sources   Download

GPL-3.0-or-later

The Requires

 

by Shawn McCabe

23/06 2018

0.1.0

0.1.0.0

A technical debt calculator for PHP

  Sources   Download

GPL-3.0-or-later

The Requires

 

by Shawn McCabe