Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By koriymv1.0.0MITIn 1 marketplace
Detect spaghetti code using PHPMD metrics. Measures CBO, CC, NPath to identify refactoring targets.
Claude loads one when your task matches it, or you run it by name.
Executables (bin/) — files in this plugin's bin/ directory are added to the Bash tool's PATH while the plugin is enabled.
1 marketplace, most starred first
php, phpmd, spaghetti, code-quality, complexity, refactoring
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
PHP Alert for Spaghetti Twisted Architecture
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.
/plugin marketplace add koriym/pasta-lunch
/plugin install pasta-lunch@pasta-lunch
composer require --dev koriym/pasta-lunch
# 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
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
| Level | Meaning | |
|---|---|---|
| 🍝 | Piccolo | Clean code |
| 🍝🍝 | Medio | Acceptable |
| 🍝🍝🍝 | Grande | Refactoring required |
| 🍝🍝🍝🍝 | Mamma Mia! | Unmaintainable |
See Sample Report for an example HTML output.
| Metric | Piccolo | Medio | Grande | Mamma Mia! |
|---|---|---|---|---|
| CyclomaticComplexity (CC) | ≤10 | 11-15 | 16-20 | 21+ |
| NPathComplexity | ≤100 | 101-200 | 201-500 | 501+ |
| CouplingBetweenObjects (CBO) | ≤10 | 11-15 | 16-20 | 21+ |
| ExcessiveClassComplexity (ECC) | ≤50 | 51-80 | 81-120 | 121+ |
| ExcessiveMethodLength | ≤50 | 51-100 | 101-150 | 151+ |
| ExcessiveParameterList | ≤5 | 6-10 | 11-15 | 16+ |
| TooManyFields | ≤10 | 11-15 | 16-20 | 21+ |
| TooManyPublicMethods | ≤10 | 11-15 | 16-20 | 21+ |
See Issue Types for detailed documentation.
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.
| Metric | PHPMD Default | PASTA Piccolo | Rationale |
|---|---|---|---|
| NPath | 200 | ≤100 | 200 paths exceeds human cognitive capacity |
| CBO | 13 | ≤10 | Proper DI keeps coupling under 10 |
| MethodLength | 100 | ≤50 | Modern standards favor 30-50 lines |
Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
npx claudepluginhub koriym/pasta-lunch --plugin pasta-lunchPlugins from other owners that cover similar ground