magento_complexity
Analyze PHP code complexity including cyclomatic complexity, function count, and line count. Identify complex hotspots to prioritize refactoring.
Instructions
Analyze code complexity — cyclomatic complexity, function count, and line count for PHP files. Identifies complex hotspots and rates each file. Use for refactoring prioritization.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Specific file or directory path to analyze instead of a module name | |
| module | No | Magento module to analyze. Finds all PHP files in the module. Examples: "Magento_Catalog", "Magento_Checkout", "Magento_Sales" | |
| threshold | No | Minimum cyclomatic complexity to report. Set higher (e.g., 10) to only see complex files. Default: 0 (show all) |