PHP Insights – code quality analysis tool

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
PHPStanPHP static analysis tool
PHP Coding Standards FixerFixes your code to follow the standards
MagoExtremely fast PHP linter, formatter, and static analyzer
PsalmStatic analysis tool
PHP InsightsAnalyses PHP code quality, complexity, architecture and style
PhanStatic analyzer for PHP
PHP_CodeSnifferTokenizes PHP files and detects violations
DeptracStatic code analysis tool for PHP projects
PHP Parallel LintChecks the syntax of PHP files in parallel
PHPLintSpeed up linting PHP files
PHPMDDetects potential bugs and poor coding practices in PHP code
PHPCompatibilityCoding standard for PHP_CodeSniffer
PHPArkitectDefine architectural rules as executable PHP code

Read our verdict in the software roundup.


Best Free and Open Source Software 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.
Subscribe

Please read our Comment Policy before commenting.

Notify of
guest
0 Comments
Oldest
Newest Most Voted