Auto-discovered marketplace from koriym/pasta-lunch
npx claudepluginhub koriym/pasta-lunchDetect spaghetti code using PHPMD metrics. Measures CBO, CC, NPath to identify refactoring targets.
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 |
Claude Code marketplace entries for the plugin-safe Antigravity Awesome Skills library and its compatible editorial bundles.
Production-ready workflow orchestration with 84 marketplace plugins, 192 local specialized agents, and 156 local skills - optimized for granular installation and minimal token usage
Directory of popular Claude Code extensions including development tools, productivity plugins, and MCP integrations