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

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

stefanzweifel/laravel-stats-phploc
==================================

A tool for quickly measuring the size of a PHP project. (Don't use this fork in your production apps)

8.0.6(7mo ago)5994.0k—3.9%11BSD-3-ClausePHPPHP ^8.0CI failing

Since Nov 9Pushed 7mo agoCompare

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

READMEChangelog (7)Dependencies (3)Versions (39)Used By (1)

PHPLOC
======

[](#phploc)

> **Warning**
> This is a fork of [phploc/phploc](https://github.com/sebastianbergmann/phploc) not intended for use in real projects. I've forked the package to make [`wnx/laravel-stats`](https://github.com/stefanzweifel/laravel-stats) compatible with different Laravel version. (I made sure multiple versions of `sebastian/version` are supported.)

---

`phploc` is a tool for quickly measuring the size and analyzing the structure 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://twitter.com/s_bergmann/status/999635212723212288)**

Usage Examples
--------------

[](#usage-examples)

### Analyse a directory and print the result

[](#analyse-a-directory-and-print-the-result)

```
$ php phploc.phar src
phploc 7.0.0 by Sebastian Bergmann.

Directories                                          3
Files                                               10

Size
  Lines of Code (LOC)                             1882
  Comment Lines of Code (CLOC)                     255 (13.55%)
  Non-Comment Lines of Code (NCLOC)               1627 (86.45%)
  Logical Lines of Code (LLOC)                     377 (20.03%)
    Classes                                        351 (93.10%)
      Average Class Length                          35
        Minimum Class Length                         0
        Maximum Class Length                       172
      Average Method Length                          2
        Minimum Method Length                        1
        Maximum Method Length                      117
    Functions                                        0 (0.00%)
      Average Function Length                        0
    Not in classes or functions                     26 (6.90%)

Cyclomatic Complexity
  Average Complexity per LLOC                     0.49
  Average Complexity per Class                   19.60
    Minimum Class Complexity                      1.00
    Maximum Class Complexity                    139.00
  Average Complexity per Method                   2.43
    Minimum Method Complexity                     1.00
    Maximum Method Complexity                    96.00

Dependencies
  Global Accesses                                    0
    Global Constants                                 0 (0.00%)
    Global Variables                                 0 (0.00%)
    Super-Global Variables                           0 (0.00%)
  Attribute Accesses                                85
    Non-Static                                      85 (100.00%)
    Static                                           0 (0.00%)
  Method Calls                                     280
    Non-Static                                     276 (98.57%)
    Static                                           4 (1.43%)

Structure
  Namespaces                                         3
  Interfaces                                         1
  Traits                                             0
  Classes                                            9
    Abstract Classes                                 0 (0.00%)
    Concrete Classes                                 9 (100.00%)
  Methods                                          130
    Scope
      Non-Static Methods                           130 (100.00%)
      Static Methods                                 0 (0.00%)
    Visibility
      Public Methods                               103 (79.23%)
      Non-Public Methods                            27 (20.77%)
  Functions                                          0
    Named Functions                                  0 (0.00%)
    Anonymous Functions                              0 (0.00%)
  Constants                                          0
    Global Constants                                 0 (0.00%)
    Class Constants                                  0 (0.00%)

```

###  Health Score

57

—

FairBetter than 98% of packages

Maintenance64

Regular maintenance activity

Popularity43

Moderate usage in the ecosystem

Community24

Small or concentrated contributor base

Maturity80

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 80.2% 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 ~127 days

Recently: every ~120 days

Total

38

Last Release

219d ago

Major Versions

3.0.x-dev → 4.0.02017-06-06

4.0.1 → 5.0.02019-03-16

5.0.0 → 6.0.02020-02-20

6.1.0 → 7.0.02020-08-13

7.1.0 → 8.0.02023-03-18

PHP version history (8 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.1.0PHP &gt;=7.3

8.0.0PHP ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/b6e76cb0a5ed6788731857a8b4e1a27e283cef831fe42bf9636549bf9b35ddd7?d=identicon)[stefanzweifel](/maintainers/stefanzweifel)

---

Top Contributors

[![sebastianbergmann](https://avatars.githubusercontent.com/u/25218?v=4)](https://github.com/sebastianbergmann "sebastianbergmann (538 commits)")[![stefanzweifel](https://avatars.githubusercontent.com/u/1080923?v=4)](https://github.com/stefanzweifel "stefanzweifel (51 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)")[![ReenExe](https://avatars.githubusercontent.com/u/10358615?v=4)](https://github.com/ReenExe "ReenExe (4 commits)")[![tommygnr](https://avatars.githubusercontent.com/u/929392?v=4)](https://github.com/tommygnr "tommygnr (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)")[![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)")[![edorian](https://avatars.githubusercontent.com/u/247397?v=4)](https://github.com/edorian "edorian (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)")[![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)")[![Stelian](https://avatars.githubusercontent.com/u/195211?v=4)](https://github.com/Stelian "Stelian (2 commits)")[![michaelbrooks](https://avatars.githubusercontent.com/u/1330400?v=4)](https://github.com/michaelbrooks "michaelbrooks (1 commits)")

### Embed Badge

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

```
[![Health](https://phpackages.com/badges/stefanzweifel-laravel-stats-phploc/health.svg)](https://phpackages.com/packages/stefanzweifel-laravel-stats-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)
