whatisgithub

What is phpinsights?

nunomaduro/phpinsights — explained in plain English

Analysis updated 2026-06-26

5,599PHPAudience · developerComplexity · 2/5LicenseSetup · easy

In one sentence

PHP Insights scans a PHP codebase in seconds and displays scores for code quality, coding style, architecture, and complexity right in your terminal, no account, dashboard, or lengthy configuration required.

Mindmap

mindmap
  root((phpinsights))
    What it does
      Scores code quality
      Checks coding style
      Measures complexity
      Analyzes architecture
    Tech stack
      PHP
      Composer
    Frameworks
      Laravel
      Symfony
      Yii
    Use cases
      Pre-deploy audit
      Style enforcement
      Codebase health check
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Audit a PHP project's code quality before a code review or deployment.

USE CASE 2

Find overly complex or tightly coupled classes and functions in an existing codebase.

USE CASE 3

Enforce consistent coding style across a Laravel or Symfony team project.

USE CASE 4

Run a quick health check on an unfamiliar PHP codebase you just inherited.

What is it built with?

PHPComposer

How does it compare?

nunomaduro/phpinsightsphan/phanphpseclib/phpseclib
Stars5,5995,6155,568
LanguagePHPPHPPHP
Setup difficultyeasymoderateeasy
Complexity2/53/52/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min

Install as a Composer dev dependency with one command, no external services or configuration required.

Use freely for any purpose including commercial projects, as long as you keep the copyright notice.

So what is it?

PHP Insights is a command-line tool that analyzes the quality of a PHP codebase and reports the results directly in the terminal. You run a single command pointing at your project, and within seconds you get a summary of how the code scores across several areas: code quality, coding style consistency, architectural structure, and complexity. The idea is to give developers an immediate, honest reading of their project without requiring an account, a dashboard, or a lengthy configuration process. The tool works out of the box with popular PHP frameworks including Laravel, Symfony, Yii, and Magento. For Laravel users, there is a dedicated Artisan command so the tool fits naturally into the existing workflow. The checks cover things like whether code is unnecessarily tangled or tightly coupled, whether it follows recognized coding conventions, and whether individual functions or classes have grown too complex to maintain. Results are displayed as a color-coded summary with scores and specific issues flagged for review. Installation is handled through Composer, the standard PHP package manager. Adding the package to a project takes one command, and it is meant to be installed as a development dependency so it does not affect the production application. The tool is open-source, released under the MIT license, and the author accepts sponsorship through GitHub.

Copy-paste prompts

Prompt 1
I just installed PHP Insights on my Laravel project. Walk me through what each score means and how to fix the top issues it flags.
Prompt 2
My PHP Insights complexity score is low. What PHP patterns cause high complexity and how do I refactor them to improve the score?
Prompt 3
How do I configure PHP Insights to ignore the tests and vendor directories and set a minimum passing score for CI?
Prompt 4
Write a GitHub Actions workflow that runs PHP Insights on every pull request and fails the build if any score drops below 90.
Prompt 5
I'm using Symfony. How do I customize PHP Insights to only check architectural rules and skip style checks?

Frequently asked questions

What is phpinsights?

PHP Insights scans a PHP codebase in seconds and displays scores for code quality, coding style, architecture, and complexity right in your terminal, no account, dashboard, or lengthy configuration required.

What language is phpinsights written in?

Mainly PHP. The stack also includes PHP, Composer.

What license does phpinsights use?

Use freely for any purpose including commercial projects, as long as you keep the copyright notice.

How hard is phpinsights to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is phpinsights for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.