PHPackages                             landingi/crap-metric-analyzer - 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. [Testing &amp; Quality](/categories/testing)
4. /
5. landingi/crap-metric-analyzer

ActiveProject[Testing &amp; Quality](/categories/testing)

landingi/crap-metric-analyzer
=============================

Code Quality tools for CI and developing purposes

v1.0.4(5y ago)026.7k1MITPHPPHP &gt;=7.4CI failing

Since Jun 26Pushed 5y ago1 watchersCompare

[ Source](https://github.com/landingi/crap-metric-analyzer)[ Packagist](https://packagist.org/packages/landingi/crap-metric-analyzer)[ RSS](/packages/landingi-crap-metric-analyzer/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (4)Dependencies (4)Versions (5)Used By (1)

Landingi Code Quality Tools
===========================

[](#landingi-code-quality-tools)

[![Build Status](https://camo.githubusercontent.com/0fc20aebca30833b75d132c435d36391c58d5d7005428e34f1b02235e24b6731/68747470733a2f2f7472617669732d63692e636f6d2f6c616e64696e67692f637261702d6d65747269632d616e616c797a65722e7376673f6272616e63683d6d6173746572)](https://travis-ci.com/landingi/crap-metric-analyzer)[![License MIT](https://camo.githubusercontent.com/2a09bd237643d62ac044b1e554f3153bcdc48c1a476ccdfcba9713539f286fd1/68747470733a2f2f696d672e736869656c64732e696f2f61706d2f6c2f76696d2d6d6f64652e737667)](https://opensource.org/licenses/MIT)[![Packagist Version](https://camo.githubusercontent.com/6ceff4427127dc827e6ee7b980e6d08a5992668c429ee8051b642136e0d46e9d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c616e64696e67692f637261702d6d65747269632d616e616c797a6572)](https://packagist.org/packages/landingi/crap-metric-analyzer)

Repository with customized code quality checks tools. This is still POC so any changes appreciated!

The tool was created to support the maintenance of clean code by developers. The current functionality checks the quality of the code in terms of crap index.

How to install?
---------------

[](#how-to-install)

```
composer require --dev landingi/crap-metric-analyzer

```

How to contribute?
------------------

[](#how-to-contribute)

Usage
-----

[](#usage)

### quality:coverage-validate

[](#qualitycoverage-validate)

Currently, supports coverage report formats:

- Clover (`--coverage-clover-path PATH`)

Currently, supports validations:

- Crap (`--crap-threshold THRESHOLD`)
- Crap index per method

There is possibility to run it through docker image e.g: `docker run --rm -v $(pwd):/project FILL_WITH_IMAGE:latest quality:coverage-validate --coverage-clover-path=resources/coverage/crap/crappy_test_object.xml --crap-threshold 5`

Example output: [![alt text](resources/images/crap-index.png "Crap index validator violation output")](resources/images/crap-index.png)

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 70% 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 ~86 days

Total

4

Last Release

1933d ago

PHP version history (2 changes)v1.0.1PHP ^7.4

v1.0.3PHP &gt;=7.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/859d0bbd1ef0d0772cf6c515be1510752ba68743d03e84435ee7b2e6117a08f2?d=identicon)[Ferror](/maintainers/Ferror)

![](https://avatars.githubusercontent.com/u/4033768?v=4)[Piotr Witkowicki](/maintainers/devofdisaster)[@devofdisaster](https://github.com/devofdisaster)

---

Top Contributors

[![xNarkon](https://avatars.githubusercontent.com/u/9370356?v=4)](https://github.com/xNarkon "xNarkon (7 commits)")[![Ferror](https://avatars.githubusercontent.com/u/17534504?v=4)](https://github.com/Ferror "Ferror (2 commits)")[![devofdisaster](https://avatars.githubusercontent.com/u/4033768?v=4)](https://github.com/devofdisaster "devofdisaster (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/landingi-crap-metric-analyzer/health.svg)

```
[![Health](https://phpackages.com/badges/landingi-crap-metric-analyzer/health.svg)](https://phpackages.com/packages/landingi-crap-metric-analyzer)
```

###  Alternatives

[testo/testo

A lightweight PHP testing framework.

1923.4k32](/packages/testo-testo)

PHPackages © 2026

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