PHPackages                             koriym/pasta-lunch - 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. koriym/pasta-lunch

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

koriym/pasta-lunch
==================

Detect spaghetti code using PHPMD metrics

0.1.1(3mo ago)05.5k—1.1%MITPHPPHP ^8.1CI passing

Since Jan 20Pushed 3mo agoCompare

[ Source](https://github.com/koriym/pasta-lunch)[ Packagist](https://packagist.org/packages/koriym/pasta-lunch)[ RSS](/packages/koriym-pasta-lunch/feed)WikiDiscussions 1.x Synced 1mo ago

READMEChangelog (2)Dependencies (3)Versions (7)Used By (0)

PASTA Lunch 🍝
=============

[](#pasta-lunch-)

**P**HP **A**lert for **S**paghetti **T**wisted **A**rchitecture

> Order your code quality check - from Piccolo to Mamma Mia!

Detect spaghetti code using PHPMD metrics.

PASTA focuses on **tangled, complex code** - the kind that's hard to test, hard to change, and hard to understand. These issues aren't caught by type checkers like PHPStan or Psalm, yet they're often what kills project sustainability over time.

Unlike general code quality tools, it specifically targets metrics that indicate code entanglement: cyclomatic complexity, coupling, and structural bloat.

Requirements
------------

[](#requirements)

- PHP 8.1+

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

[](#installation)

### As Claude Code Plugin

[](#as-claude-code-plugin)

```
/plugin marketplace add koriym/pasta-lunch
/plugin install pasta-lunch@pasta-lunch

```

### Via Composer

[](#via-composer)

```
composer require --dev koriym/pasta-lunch
```

Usage
-----

[](#usage)

```
# Via composer script (default target: src)
composer pasta
composer pasta:html > report.html

# Direct execution
./vendor/bin/pasta
./vendor/bin/pasta --format=md > report.md
./vendor/bin/pasta --format=html > report.html

# Custom exclude patterns (default: *Module.php)
./vendor/bin/pasta src --exclude="*Module.php,*Test.php"

# No exclusions
./vendor/bin/pasta src --no-exclude
```

Composer Scripts
----------------

[](#composer-scripts)

Add to your project's `composer.json`:

```
{
    "scripts": {
        "pasta": "bin/pasta src",
        "pasta:html": "bin/pasta src --format=html"
    }
}
```

Usage:

```
composer pasta
composer pasta:html > report.html
```

Spaghetti Levels
----------------

[](#spaghetti-levels)

LevelMeaning🍝PiccoloClean code🍝🍝MedioAcceptable🍝🍝🍝GrandeRefactoring required🍝🍝🍝🍝Mamma Mia!UnmaintainableDemo
----

[](#demo)

See [Sample Report](https://koriym.github.io/pasta-lunch/demo/report.html) for an example HTML output.

Metrics
-------

[](#metrics)

MetricPiccoloMedioGrandeMamma Mia!CyclomaticComplexity (CC)≤1011-1516-2021+NPathComplexity≤100101-200201-500501+CouplingBetweenObjects (CBO)≤1011-1516-2021+ExcessiveClassComplexity (ECC)≤5051-8081-120121+ExcessiveMethodLength≤5051-100101-150151+ExcessiveParameterList≤56-1011-1516+TooManyFields≤1011-1516-2021+TooManyPublicMethods≤1011-1516-2021+See [Issue Types](https://koriym.github.io/pasta-lunch/) for detailed documentation.

### Why these thresholds?

[](#why-these-thresholds)

PASTA thresholds are designed around **clean code ideals**, not just "acceptable" levels. PHPMD defaults represent the point where "measures should be taken" - meaning code at those thresholds already needs attention.

MetricPHPMD DefaultPASTA PiccoloRationaleNPath200≤100200 paths exceeds human cognitive capacityCBO13≤10Proper DI keeps coupling under 10MethodLength100≤50Modern standards favor 30-50 lines- **Piccolo** = Clean, maintainable code
- **Medio** = Approaching PHPMD thresholds
- **Grande** = At or beyond PHPMD "action required" level
- **Mamma Mia!** = Critical, immediate refactoring needed

License
-------

[](#license)

[MIT](LICENSE)

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance78

Regular maintenance activity

Popularity25

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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 ~0 days

Total

3

Last Release

117d ago

Major Versions

0.1.1 → 1.x-dev2026-01-21

### Community

Maintainers

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

---

Top Contributors

[![koriym](https://avatars.githubusercontent.com/u/529021?v=4)](https://github.com/koriym "koriym (67 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/koriym-pasta-lunch/health.svg)

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

###  Alternatives

[acquia/orca

A tool for testing a company's software packages together in the context of a realistic, functioning, best practices Drupal build

32902.4k](/packages/acquia-orca)[axelerant/drupal-quality-checker

Code quality checking tools for Drupal project.

13197.9k1](/packages/axelerant-drupal-quality-checker)[blackboard-open-source/moodle-plugin-ci

Assists with running Moodle plugins in Travis CI

42141.8k](/packages/blackboard-open-source-moodle-plugin-ci)[youwe/testing-suite

Contains Youwe's default testing packages for php.

13176.9k8](/packages/youwe-testing-suite)

PHPackages © 2026

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