PHPackages                             fractalizer/ai-mess-detector - 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. [CLI &amp; Console](/categories/cli)
4. /
5. fractalizer/ai-mess-detector

ActiveLibrary[CLI &amp; Console](/categories/cli)

fractalizer/ai-mess-detector
============================

CLI tool for static analysis of PHP code - detects architectural mess and complexity issues

v0.2.2(2mo ago)05—0%MITPHPPHP ^8.4CI passing

Since Mar 4Pushed 1mo agoCompare

[ Source](https://github.com/FractalizeR/php_ai_mess_detector)[ Packagist](https://packagist.org/packages/fractalizer/ai-mess-detector)[ Docs](https://github.com/FractalizeR/php_ai_mess_detector)[ RSS](/packages/fractalizer-ai-mess-detector/feed)WikiDiscussions main Synced 2mo ago

READMEChangelogDependencies (24)Versions (6)Used By (0)

AI Mess Detector
================

[](#ai-mess-detector)

Static analysis tool for PHP code quality metrics.

Features
--------

[](#features)

- **Complexity Metrics**: Cyclomatic (CCN), Cognitive, NPATH
- **Maintainability**: Halstead metrics, Maintainability Index
- **Coupling**: RFC, Instability, Abstractness, Distance from Main Sequence
- **Cohesion**: TCC/LCC, LCOM4, WMC
- **Size**: LOC, Class/Method/Property Count
- **Structure**: DIT, NOC
- **Architecture**: Circular Dependency Detection

Quick Start
-----------

[](#quick-start)

```
# Install
composer require --dev fractalizer/ai-mess-detector

# Analyze
bin/aimd check src/

# With specific format
bin/aimd check src/ --format=json

# Pre-commit hook
bin/aimd hook:install
```

Output Formats
--------------

[](#output-formats)

FormatUse Case`text`CLI, human-readable`json`CI/CD integration`checkstyle`Jenkins, SonarQube`sarif`GitHub Security, VS Code`gitlab`GitLab Code QualityConfiguration
-------------

[](#configuration)

Create `aimd.yaml`:

```
rules:
  complexity:
    warning_threshold: 10
    error_threshold: 20

  cognitive:
    warning_threshold: 15
    error_threshold: 30
```

Or use CLI options:

```
bin/aimd check src/ --cyclomatic-warning=10 --cyclomatic-error=20
```

Git Integration
---------------

[](#git-integration)

```
# Analyze staged files only
bin/aimd check src/ --analyze=git:staged

# Show violations in changed files
bin/aimd check src/ --report=git:main..HEAD
```

Baseline Support
----------------

[](#baseline-support)

```
# Generate baseline for existing violations
bin/aimd check src/ --generate-baseline=baseline.json

# Use baseline
bin/aimd check src/ --baseline=baseline.json
```

Documentation
-------------

[](#documentation)

- [Quick Start](docs/QUICK_START.md)
- [Architecture](docs/ARCHITECTURE.md)
- [GitHub Action](docs/GITHUB_ACTION.md)
- [Changelog](CHANGELOG.md)
- [llms.txt](https://fractalizer.github.io/php_ai_mess_detector/llms.txt) — concise reference for AI agents
- [llms-full.txt](https://fractalizer.github.io/php_ai_mess_detector/llms-full.txt) — complete documentation in a single file

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

[](#requirements)

- PHP 8.4+
- Composer

Development
-----------

[](#development)

```
composer install
composer test      # Run tests
composer phpstan   # Static analysis
composer check     # Full validation
```

License
-------

[](#license)

MIT

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance89

Actively maintained with recent releases

Popularity5

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

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

5

Last Release

65d ago

### Community

Maintainers

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

---

Tags

phpclistatic analysismess detectorMetricscode qualityarchitecturecomplexity

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/fractalizer-ai-mess-detector/health.svg)

```
[![Health](https://phpackages.com/badges/fractalizer-ai-mess-detector/health.svg)](https://phpackages.com/packages/fractalizer-ai-mess-detector)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M650](/packages/sylius-sylius)[simplesamlphp/simplesamlphp

A PHP implementation of a SAML 2.0 service provider and identity provider.

1.1k12.4M193](/packages/simplesamlphp-simplesamlphp)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[contao/core-bundle

Contao Open Source CMS

1231.6M2.3k](/packages/contao-core-bundle)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)

PHPackages © 2026

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