PHP Insights is a command-line code quality analysis tool that provides an overview of a PHP project’s quality, complexity, architecture, and coding style. It presents separate scores for these areas, together with details of the problems detected.
The software combines coding standards checks with analysis of structural and maintainability issues. It can examine complete projects, individual directories, or selected files, and integrates with Laravel through an Artisan command.
This is free and open source software.
Key Features
- Calculates separate scores for code quality, complexity, architecture, and style.
- Detects unused variables, unused private elements, unnecessary modifiers, and redundant code.
- Checks naming conventions, class structure, property declarations, method design, and control structures.
- Identifies issues with namespace imports, comparisons, type declarations, and coding conventions.
- Provides automatic fixes for supported violations using the fix command or –fix option.
- Supports custom configuration of individual checks, exclusions, and coding standards.
- Analyses multiple directories and files in a single execution.
- Provides configuration and integration support for Laravel, Symfony, Magento, and other PHP projects.
- Enforces minimum quality, complexity, architecture, and style scores in continuous integration pipelines.
- Integrates with GitHub Actions annotations and GitLab Code Quality reports.
- Generates console, JSON, and Checkstyle reports for inspection or processing by other tools.
- Caches analysis results and invalidates cached information when source files change.
- Provides configurable diagnostic output, including verbosity levels and code differences.
- Includes dependency security checks that can cause continuous integration jobs to fail.
- Cross-platform support – runs on Linux, macOS, and Windows.
Website: github.com/nunomaduro/phpinsights
Support:
Developer: Nuno Maduro
License: MIT License
PHP Insights is written in PHP. Learn PHP with our recommended free books and free tutorials.
Related Software
| PHP Linters | |
|---|---|
| PHPStan | PHP static analysis tool |
| PHP Coding Standards Fixer | Fixes your code to follow the standards |
| Mago | Extremely fast PHP linter, formatter, and static analyzer |
| Psalm | Static analysis tool |
| PHP Insights | Analyses PHP code quality, complexity, architecture and style |
| Phan | Static analyzer for PHP |
| PHP_CodeSniffer | Tokenizes PHP files and detects violations |
| Deptrac | Static code analysis tool for PHP projects |
| PHP Parallel Lint | Checks the syntax of PHP files in parallel |
| PHPLint | Speed up linting PHP files |
| PHPMD | Detects potential bugs and poor coding practices in PHP code |
| PHPCompatibility | Coding standard for PHP_CodeSniffer |
| PHPArkitect | Define architectural rules as executable PHP code |
Read our verdict in the software roundup.
LinuxLinks helps you discover the best free and open source software for Linux. Explore our extensive collection of recommended applications, including alternatives to popular proprietary software.We also publish software reviews, Linux tutorials, hardware reviews, free programming books and articles covering the wider open source community. Browse our Linux resources to discover more. Know a useful free and open source Linux application we haven't covered? Suggest a program for inclusion. Has your software been featured on LinuxLinks? Display one of our Featured on LinuxLinks badges on your website or GitHub README. |


Please read our Comment Policy before commenting.