PHPackages                             aghar/symfony-perf-analyzer - 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. [Debugging &amp; Profiling](/categories/debugging)
4. /
5. aghar/symfony-perf-analyzer

ActiveLibrary[Debugging &amp; Profiling](/categories/debugging)

aghar/symfony-perf-analyzer
===========================

Symfony Performance Analyzer is a smart CLI tool that automatically scans your codebase to instantly detect performance bottlenecks like N+1 queries and risky debug configurations. By providing a clear performance score and actionable insights, it helps developers ship faster, production-ready applications with absolute confidence.

v1.1.0(4mo ago)010↓93.3%MITPHPPHP &gt;=8.1CI passing

Since Feb 23Pushed 4mo agoCompare

[ Source](https://github.com/aghar-saif-eddine/symfony-perf-analyzer)[ Packagist](https://packagist.org/packages/aghar/symfony-perf-analyzer)[ RSS](/packages/aghar-symfony-perf-analyzer/feed)WikiDiscussions main Synced today

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

🚀 Symfony Performance Analyzer
==============================

[](#-symfony-performance-analyzer)

[![Latest Version on Packagist](https://camo.githubusercontent.com/648dd0a012cf893aac56b7e754fa3576813d830adfb8af04981db51db99cf1ad/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f61676861722f73796d666f6e792d706572662d616e616c797a65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/aghar/symfony-perf-analyzer)[![GitHub Actions CI](https://camo.githubusercontent.com/4eccc41a707a30f352b28ec7c4ee9bfd2c6f43fc1e972a3163c4035145fb2d32/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f61676861722d736169662d656464696e652f73796d666f6e792d706572662d616e616c797a65722f63692e796d6c3f6272616e63683d6d61696e267374796c653d666c61742d737175617265)](https://github.com/aghar-saif-eddine/symfony-perf-analyzer/actions)[![PHP Version Require](https://camo.githubusercontent.com/36aaeaa14ea71f40429245b222189cce76df8edc087c74d082db820b6322440a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f61676861722f73796d666f6e792d706572662d616e616c797a65723f7374796c653d666c61742d737175617265)](https://packagist.org/packages/aghar/symfony-perf-analyzer)[![Total Downloads](https://camo.githubusercontent.com/c2591f17a1541ea81332860fd8735329bfc1722ccc4d01b3040bb22ead3cd46a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f61676861722f73796d666f6e792d706572662d616e616c797a65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/aghar/symfony-perf-analyzer)[![License](https://camo.githubusercontent.com/1fed30622298b02a50f24f212ac621366a8f10984c2fd307c17cbb581166d516/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f61676861722f73796d666f6e792d706572662d616e616c797a65723f7374796c653d666c61742d737175617265)](https://packagist.org/packages/aghar/symfony-perf-analyzer)

> *Symfony Performance Analyzer is a smart CLI tool that automatically scans your codebase to instantly detect performance bottlenecks like N+1 queries and risky debug configurations. By providing a clear performance score and actionable insights, it helps developers ship faster, production-ready applications with absolute confidence.*

---

### 📸 Analyzer in Action

[](#-analyzer-in-action)

[![img_1.png](img_1.png)](img_1.png)
------------------------------------

[](#)

✨ Features
----------

[](#-features)

- **🔍 N+1 Query Risk Detection:** Uses advanced Abstract Syntax Tree (AST) parsing via `nikic/php-parser` to catch Doctrine entities fetching relations inside loops (The silent performance killer).
- **🐢 Slow Query Scanner:** Analyzes the Symfony Profiler tokens to identify database queries exceeding 50ms without executing them.
- **⚙️ Production Config Check:** Ensures `APP_DEBUG` is not accidentally left enabled, preventing massive memory leaks in production environments.
- **📊 Gamified Scoring System:** Get a clear performance score (out of 100) to measure your app's health at a glance.
- **🤖 CI/CD &amp; SaaS Ready:** Export results in JSON format to seamlessly integrate with GitHub Actions, GitLab CI, or your custom SaaS dashboards.

📦 Installation
--------------

[](#-installation)

You can install the package via composer. It is highly recommended to install it as a development dependency:

```
composer require --dev aghar/symfony-perf-analyzer
```

🚀 Usage
-------

[](#-usage)

Run the analyzer directly from your terminal at the root of your Symfony project:

```
php vendor/bin/perf-analyzer analyze
```

(By default, it will scan the current directory and display a beautiful console output with your performance score).

#### 🔌 Custom Project Path

[](#-custom-project-path)

You can specify a different Symfony project path as an argument:

```
php vendor/bin/perf-analyzer analyze /path/to/your/symfony/project
```

⚙️ JSON Output (For CI/CD Pipelines)
------------------------------------

[](#️-json-output-for-cicd-pipelines)

If you want to parse the output in an automated CI pipeline or send it to an external SaaS dashboard, use the JSON format:

```
php vendor/bin/perf-analyzer analyze --format=json
```

🏗️ Extensible Architecture
--------------------------

[](#️-extensible-architecture)

The analyzer is built with a clean, decoupled architecture making it easy to add new rules:

- src/Analyzer/Rules/: Contains the specific detection logic (AST traversing, regex, file scanning).
- src/Formatter/: Handles the output rendering (Console UI or strict JSON).
- src/Model/: Data structures representing violations and comprehensive reports.

🤝 Contributing
--------------

[](#-contributing)

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

📄 License
---------

[](#-license)

The MIT License (MIT).

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance76

Regular maintenance activity

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 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

6

Last Release

128d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/24b0e3b932b603e45702b0b9f70bed31fbd8e23ace3ba6e0d8409b00c86d1895?d=identicon)[aghar-saif-eddine](/maintainers/aghar-saif-eddine)

---

Top Contributors

[![aghar-saif-eddine](https://avatars.githubusercontent.com/u/45357013?v=4)](https://github.com/aghar-saif-eddine "aghar-saif-eddine (14 commits)")

### Embed Badge

![Health badge](/badges/aghar-symfony-perf-analyzer/health.svg)

```
[![Health](https://phpackages.com/badges/aghar-symfony-perf-analyzer/health.svg)](https://phpackages.com/packages/aghar-symfony-perf-analyzer)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M345](/packages/psalm-plugin-laravel)[jolicode/castor

A lightweight and modern task runner. Automate everything. In PHP.

54743.1k4](/packages/jolicode-castor)[phparkitect/phparkitect

Enforce architectural constraints in your PHP applications

9224.3M28](/packages/phparkitect-phparkitect)[rector/rector-src

Instant Upgrade and Automated Refactoring of any PHP code

136406.3k14](/packages/rector-rector-src)[typo3/cms

TYPO3 CMS is a free open source Content Management Framework initially created by Kasper Skaarhoj and licensed under GNU/GPL.

1.2k1.9M122](/packages/typo3-cms)[silverstripe/framework

The SilverStripe framework

7313.7M2.8k](/packages/silverstripe-framework)

PHPackages © 2026

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