cmgmyr/phploc
Measure the size and structure of a PHP project with phploc: lines of code, cyclomatic complexity, dependencies, and class counts, right from the command line.
Consider it when:
app/ or src/.8.0.8) and validate output on a representative repository before relying on it in CI.Look elsewhere when:
sebastianbergmann/phploc or a commercially supported platform, and revisit this fork only if it proves stable in your environment.For executives: This is a low-cost diagnostic, not a platform bet. It gives us a repeatable way to quantify maintainability risk—code size, comment ratio, class and method length, cyclomatic complexity—so refactoring and modernization requests can be justified with numbers instead of anecdotes. Adoption cost is one dev dependency and a CI step; the risk is maintenance, since the package is a low-adoption fork. Recommend a time-boxed pilot on one repository, with a fallback to the upstream tool or existing static analysis if output or maintenance disappoints. Do not position it as a security or quality certification tool.
For engineering: Install as a dev dependency, run phploc app/ or phploc src/, and use the output to set a small number of complexity budgets in CI—not to chase every metric. Pin the version, parse only the metrics you will act on, and validate against a known codebase first. The tool is CLI-only and text-output, so wrap it if you need structured reporting. It complements PHPStan/PHPMD; it does not replace them. Treat the fork’s low adoption and future-dated release metadata as diligence flags, and keep the upstream package or an internal script as a fallback.
How can I help you explore Laravel packages today?