PHPackages                             phploc/phploc - 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. phploc/phploc

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

phploc/phploc
=============

A tool for quickly measuring the size of a PHP project

7.0.2(5y ago)2.3k23.6M—8.1%16220BSD-3-ClausePHPPHP &gt;=7.3CI passing

Since Nov 9Pushed 1y ago66 watchersCompare

[ Source](https://github.com/sebastianbergmann/phploc)[ Packagist](https://packagist.org/packages/phploc/phploc)[ Docs](https://github.com/sebastianbergmann/phploc)[ GitHub Sponsors](https://github.com/sebastianbergmann)[ RSS](/packages/phploc-phploc/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (3)Versions (28)Used By (20)

**This project is no longer maintained and its repository is only kept for archival purposes.**

PHPLOC
======

[](#phploc)

`phploc` is a tool for quickly measuring the size of a PHP project.

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

[](#installation)

This tool is distributed as a [PHP Archive (PHAR)](https://php.net/phar):

```
$ wget https://phar.phpunit.de/phploc.phar

$ php phploc.phar --version
```

Using [Phive](https://phar.io/) is the recommended way for managing the tool dependencies of your project:

```
$ phive install phploc

$ ./tools/phploc --version
```

**[It is not recommended to use Composer to download and install this tool.](https://docs.phpunit.de/en/main/installation.html#phar-or-composer)**

Usage Example
-------------

[](#usage-example)

```
$ php phploc.phar src
phploc 8.0-dev by Sebastian Bergmann.

Directories:                                        104
Files:                                              856

Lines of Code (LOC):                             67,955
Comment Lines of Code (CLOC):                    19,533 (28.74%)
Non-Comment Lines of Code (NCLOC):               48,422 (71.26%)
Logical Lines of Code (LLOC):                    18,478 (27.19%)

Classes or Traits                                   662
  Methods                                         3,389
    Cyclomatic Complexity
      Lowest                                       1.00
      Average                                      2.00
      Highest                                    156.00

Functions                                           185
  Cyclomatic Complexity
    Lowest                                         1.00
    Average                                        1.00
    Highest                                        1.00

```

###  Health Score

60

—

FairBetter than 99% of packages

Maintenance35

Infrequent updates — may be unmaintained

Popularity74

Solid adoption and visibility

Community58

Growing community involvement

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 86.8% 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 ~113 days

Recently: every ~71 days

Total

27

Last Release

1989d ago

Major Versions

2.1.5 → 3.0.02016-01-13

3.0.1 → 4.0.02017-06-06

4.0.1 → 5.0.02019-03-16

5.0.0 → 6.0.02020-02-20

6.0.2 → 7.0.02020-08-13

PHP version history (7 changes)1.7.3PHP &gt;=5.3.3

2.1.0PHP &gt;=5.4

3.0.0PHP &gt;=5.6

4.0.0PHP ^5.6 || ^7.0

5.0.0PHP ^7.2

6.0.0PHP ^7.3

7.0.2PHP &gt;=7.3

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1089?v=4)[Sebastian Probst Eide](/maintainers/sebastian)[@sebastian](https://github.com/sebastian)

---

Top Contributors

[![sebastianbergmann](https://avatars.githubusercontent.com/u/25218?v=4)](https://github.com/sebastianbergmann "sebastianbergmann (547 commits)")[![kubawerlos](https://avatars.githubusercontent.com/u/9282069?v=4)](https://github.com/kubawerlos "kubawerlos (21 commits)")[![matthiasnoback](https://avatars.githubusercontent.com/u/1193078?v=4)](https://github.com/matthiasnoback "matthiasnoback (7 commits)")[![krzysiekpiasecki](https://avatars.githubusercontent.com/u/4520629?v=4)](https://github.com/krzysiekpiasecki "krzysiekpiasecki (6 commits)")[![GrahamCampbell](https://avatars.githubusercontent.com/u/2829600?v=4)](https://github.com/GrahamCampbell "GrahamCampbell (5 commits)")[![tommygnr](https://avatars.githubusercontent.com/u/929392?v=4)](https://github.com/tommygnr "tommygnr (4 commits)")[![ReenExe](https://avatars.githubusercontent.com/u/10358615?v=4)](https://github.com/ReenExe "ReenExe (4 commits)")[![reinholdfuereder](https://avatars.githubusercontent.com/u/145182?v=4)](https://github.com/reinholdfuereder "reinholdfuereder (3 commits)")[![Sgoettschkes](https://avatars.githubusercontent.com/u/628796?v=4)](https://github.com/Sgoettschkes "Sgoettschkes (3 commits)")[![ramonornela](https://avatars.githubusercontent.com/u/187946?v=4)](https://github.com/ramonornela "ramonornela (2 commits)")[![remicollet](https://avatars.githubusercontent.com/u/270445?v=4)](https://github.com/remicollet "remicollet (2 commits)")[![edorian](https://avatars.githubusercontent.com/u/247397?v=4)](https://github.com/edorian "edorian (2 commits)")[![Stelian](https://avatars.githubusercontent.com/u/195211?v=4)](https://github.com/Stelian "Stelian (2 commits)")[![christeredvartsen](https://avatars.githubusercontent.com/u/25402?v=4)](https://github.com/christeredvartsen "christeredvartsen (2 commits)")[![dennisdegreef](https://avatars.githubusercontent.com/u/361905?v=4)](https://github.com/dennisdegreef "dennisdegreef (2 commits)")[![derrabus](https://avatars.githubusercontent.com/u/1506493?v=4)](https://github.com/derrabus "derrabus (2 commits)")[![ihabunek](https://avatars.githubusercontent.com/u/482138?v=4)](https://github.com/ihabunek "ihabunek (2 commits)")[![ircmaxell](https://avatars.githubusercontent.com/u/660654?v=4)](https://github.com/ircmaxell "ircmaxell (2 commits)")[![villfa](https://avatars.githubusercontent.com/u/2891564?v=4)](https://github.com/villfa "villfa (1 commits)")[![henriquemoody](https://avatars.githubusercontent.com/u/154023?v=4)](https://github.com/henriquemoody "henriquemoody (1 commits)")

### Embed Badge

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

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

###  Alternatives

[phpunit/phpunit

The PHP Unit Testing framework.

20.0k910.7M134.8k](/packages/phpunit-phpunit)[phing/phing

PHing Is Not GNU make; it's a PHP project build system or build tool based on Apache Ant.

1.2k21.7M876](/packages/phing-phing)[phpunit/phpcov

CLI frontend for php-code-coverage

23721.1M583](/packages/phpunit-phpcov)[cmgmyr/phploc

A tool for quickly measuring the size of a PHP project.

266.6M3](/packages/cmgmyr-phploc)

PHPackages © 2026

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