Analysis tools logo

Best 95 PHP static analysis tools

48

PHPStan

  • Type: cli

PHP Static Analysis Tool - discover bugs in your code without running it!

37

Psalm

  • Type: cli

Static analysis tool for finding type errors in PHP applications.

33

SonarQube

  • Type: service

SonarQube is an open platform to manage code quality.

17

phan

  • Type: cli

A modern static analyzer from etsy.

16

PHP Coding Standards Fixer

  • Type: cli

Fixes your code according to standards like PSR-1, PSR-2, and the Symfony standard.

12

PHP_CodeSniffer

  • Type: cli

Detects violations of a defined set of coding standards.

11

Coverity

  • Type: cli

Synopsys Coverity supports 20 languages and over 70 frameworks including Ruby on rails, Scala, PHP, Python, JavaScript, TypeScript, Java, Fortran, C, C++, C#, VB.NET.

11

Php Inspections (EA Extended)

  • Type: cli

A Static Code Analyzer for PHP.

10

Better Code Hub

  • Type: service

Better Code Hub checks your GitHub codebase against 10 engineering guidelines devised by the authority in software quality, Software Improvement Group.

5

deptrac

  • Type: cli

Enforce rules for dependencies between software layers.

5

Fortify

  • Type: ide-plugin

A commercial static analysis platform that supports the scanning of C/C++, C#, VB.NET, VB6, ABAP/BSP, ActionScript, Apex, ASP.NET, Classic ASP, VB Script, Cobol, ColdFusion, HTML, Java, JS, JSP, MXML/Flex, Objective-C, PHP, PL/SQL, T-SQL, Python (2.6, 2.7), Ruby (1.9.3), Swift, Scala, VB, and XML.

5

PHPMD

  • Type: cli

Finds possible bugs in your code.

4

CodeScene

  • Type: service

CodeScene is a quality visualization tool for software. Prioritize technical debt, detect delivery risks, and measure organizational aspects. Fully automated.

4

EasyCodingStandard

  • Type: cli

Combine [PHP_CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer) and [PHP-CS-Fixer](https://github.com/FriendsOfPHP/PHP-CS-Fixer).

3

pdepend

  • Type: cli

Calculates software metrics like cyclomatic complexity for PHP code.

3

PHP Insights

  • Type: cli

Instant PHP quality checks from your console. Analysis of code quality and coding style as well as overview of code architecture and its complexity.

3

phpcpd

  • Type: cli

Copy/Paste Detector for PHP code.

3

SensioLabs Insight

  • Type: service

Detect security risks, find bugs and provide actionable metrics for PHP projects.

2

Atom-Beautify

  • Type: ide-plugin

Beautify HTML, CSS, JavaScript, PHP, Python, Ruby, Java, C, C++, C#, Objective-C, CoffeeScript, TypeScript, Coldfusion, SQL, and more in Atom editor.

2

GrumPHP

  • Type: cli

Checks code on every commit.

2

PHP Architecture Tester

  • Type: cli

Easy to use architecture testing tool for PHP.

2

PHP-Parser

  • Type: cli

A PHP parser written in PHP.

2

phpdoc-to-typehint

  • Type: cli

Add scalar type hints and return types to existing PHP projects using PHPDoc annotations.

2

phpDocumentor

  • Type: cli

Analyzes PHP source code to generate documentation.

2

PhpMetrics

  • Type: cli

Calculates and visualizes various code quality metrics.

2

Semmle QL and LGTM

  • Type: cli

Find security vulnerabilities, variants, and critical code quality issues using queries over source code. Automatic PR code review; free for public GitHub/Bitbucket repo: [LGTM.com](https://LGTM.com).

1

Axivion Bauhaus Suite

  • Type: cli

Tracks down error-prone code locations, style violations, cloned or dead code, cyclic dependencies and more for C/C++, C#/.NET, Java and Ada 83/Ada 95.

1

dephpend

  • Type: cli

Dependency analysis tool.

1

deprecation-detector

  • Type: cli

Finds usages of deprecated (Symfony) code.

1

DesignPatternDetector

  • Type: cli

Detection of design patterns in PHP code.

1

exakat

  • Type: cli

An automated code reviewing engine for PHP.

1

Mondrian

  • Type: cli

A set of static analysis and refactoring tools which use graph theory.

1

parallel-lint

  • Type: cli

This tool checks syntax of PHP files faster than serial check with a fancier output.

1

Parse

  • Type: cli

A Static Security Scanner.

1

PHP Assumptions

  • Type: cli

Checks for weak assumptions.

1

PHP Refactoring Browser

  • Type: cli

Refactoring helper.

1

PHP Semantic Versioning Checker

  • Type: cli

Suggests a next version according to semantic versioning.

1

php-speller

  • Type: cli

PHP spell check library.

1

PHP-Token-Reflection

  • Type: cli

Library emulating the PHP internal reflection.

1

phpca

  • Type: cli

Finds usage of non-built-in extensions.

1

phpcf

  • Type: cli

Finds usage of deprecated PHP features.

1

PhpDependencyAnalysis

  • Type: cli

Builds a dependency graph for a project.

1

phploc

  • Type: cli

A tool for quickly measuring the size and analyzing the structure of a PHP project.

1

phpmnd

  • Type: cli

Helps to detect magic numbers.

1

phpqa - jakzal

  • Type: cli

Many tools for PHP static analysis in one container.

1

phpqa - jmolivas

  • Type: cli

PHPQA all-in-one Analyzer CLI tool.

1

PHPQA

  • Type: cli

A tool for running QA tools (phploc, phpcpd, phpcs, pdepend, phpmd, phpmetrics).

1

phpsa

  • Type: cli

Static analysis tool for PHP.

1

pre-commit

  • Type: cli

A framework for managing and maintaining multi-language pre-commit hooks.

1

Progpilot

  • Type: cli

A static analysis tool for security purposes.

1

Qafoo Quality Analyzer

  • Type: cli

Visualizes metrics and source code.

1

ShiftLeft Scan

  • Type: cli
  • Type: service

Scan is a free open-source DevSecOps platform for detecting security issues in source code and dependencies. It supports a broad range of languages and CI/CD pipelines.

1

Snyk

  • Type: service

Vulnerability scanner for dependencies of node.js apps (free for Open Source Projects).

1

Tuli

  • Type: cli

A static analysis engine.

1

twig-lint

  • Type: cli

twig-lint is a lint tool for your twig files.

1

Unibeautify

  • Type: cli
  • Type: service

Universal code beautifier with a GitHub app. Supports HTML, CSS, JavaScript, TypeScript, JSX, Vue, C++, Go, Objective-C, Java, Python, PHP, GraphQL, Markdown, and more.

1

WAP

  • Type: cli

Tool to detect and correct input validation vulnerabilities in PHP (4.0 or higher) web applications and predicts false positives by combining static analysis and data mining.

0

AppChecker

  • Type: cli

Static analysis for C/C++/C#, PHP and Java.

0

Application Inspector

  • Type: service

Commercial Static Code Analysis which generates exploits to verify vulnerabilities.

0

ApplicationInspector

  • Type: cli

Creates reports of over 400 rule patterns for feature detection (e.g. the use of cryptography or version control in apps).

0

Code Inspector

  • Type: service

Code quality and technical debt management platform that supports 10+ languages.

0

Codeac

  • Type: service

Automated code review tool integrates with GitHub, Bitbucket and GitLab (even self-hosted). Available for JavaScript, TypeScript, Python, Ruby, Go, PHP, Java, Docker, and more. (open-source free)

0

codeburner

  • Type: cli

Provides a unified interface to sort and act on the issues it finds.

0

CodeFlow

  • Type: service

Automated code analysis tool to deal with technical depth. Integrates with Bitbucket and Gitlab. (free for Open Source Projects)

0

CodePatrol

  • Type: service

Automated SAST code reviews driven by security, supports 15+ languages and includes security training.

0

Depends

  • Type: cli

Analyses the comprehensive dependencies of code elements for Java, C/C++, Ruby.

0

DevSkim

  • Type: ide-plugin

Regex-based static analysis tool for Visual Studio, VS Code, and Sublime Text - C/C++, C#, PHP, ASP, Python, Ruby, Java, and others.

0

Goodcheck

  • Type: cli

Regexp based customizable linter.

0

graudit

  • Type: cli

Grep rough audit - source code auditing tool.

0

Lumnify

  • Type: cli

Benchmark against thousands of projects, and analyse code for structural quality with focus on maintainability.

0

Nitpick CI

  • Type: service

Automated PHP code review.

0

Pronto

  • Type: cli

Quick automated code review of your changes. Supports more than 40 runners for various languages, including Clang, Elixir, JavaScript, PHP, Ruby and more.

0

RIPS

  • Type: cli

A static source code analyser for vulnerabilities in PHP scripts.

0

Scrutinizer

  • Type: service

A proprietary code quality checker that can be integrated with GitHub.

0

Security Code Scan

  • Type: ide-plugin

Security code analyzer for C# and VB.NET. Detects various security vulnerability patterns: SQLi, XSS, CSRF, XXE, Open Redirect, etc. Integrates into Visual Studio 2015 and newer. Detects various security vulnerability patterns: SQLi, XSS, CSRF, XXE, Open Redirect, etc.

0

SmartDec Scanner

  • Type: cli

SAST tool which is capable of identifying vulnerabilities and undocumented features. The analyzer scans the source code and executables without debug info (i.e. binaries). Supports: Java/Scala/Kotlin, PHP, C#, JavaScript, TypeScript, VBScript, HTML5, Python, Perl, C/C++, Objective-C/Swift, PL/SQL, T-SQL, ABAP, 1C, Apex, Go, Ruby, Groovy, Delphi, VBA, Visual Basic 6, Solidity, Vyper, COBOL.

0

Undebt

  • Type: cli

Language-independent tool for massive, automatic, programmable refactoring based on simple pattern definitions.

0

Upsource

  • Type: service

Code review tool with static code analysis and code-aware navigation for Java, PHP, JavaScript and Kotlin.

0

Veracode

  • Type: cli

Find flaws in binaries and bytecode without requiring source. Support all major programming languages: Java, .NET, JavaScript, Swift, Objective-C, C, C++ and more.

0

WhiteHat Application Security Platform

  • Type: cli

WhiteHat Scout (for Developers) combined with WhiteHat Sentinel Source (for Operations) supporting WhiteHat Top 40 and OWASP Top 10.

-1

CAST Highlight

  • Type: cli

Commercial Static Code Analysis which runs locally, but uploads the results to its cloud for presentation.

-1

Synopsys

  • Type: cli

A commercial static analysis platform that allows for scanning of multiple languages (C/C++, Android, C#, Java, JS, PHP, Python, Node.JS, Ruby, Fortran, and Swift).

-2

APPscreener

  • Type: cli

Static code analysis for binary and source code - Java/Scala, PHP, Javascript, C#, PL/SQL, Python, T-SQL, C/C++, ObjectiveC/Swift, Visual Basic 6.0, Ruby, Delphi, ABAP, HTML5 and Solidity.

-2

Kiuwan

  • Type: service

Identify and remediate cyber threats in a blazingly fast, collaborative environment, with seamless integration in your SDLC. Python, C\C++, Java, C#, PHP and more.

Deprecated/unmaintained tools

2

phpdcd

  • Type: cli

Dead Code Detector (DCD) for PHP code.

1

churn-php

  • Type: cli

Helps discover good candidates for refactoring.

1

php7cc

  • Type: cli

PHP 7 Compatibility Checker.

1

php7mar

  • Type: cli

Assist developers in porting their code quickly to PHP 7.

0

pfff

  • Type: cli

Facebook's tools for code analysis, visualizations, or style-preserving source transformation for many languages.

0

PT.PM

  • Type: cli

An engine for searching patterns in the source code, based on Unified AST or UST. At present time C#, Java, PHP, PL/SQL, T-SQL, and JavaScript are supported. Patterns can be described within the code or using a DSL.

0

shipshape

  • Type: cli

Static program analysis platform that allows custom analyzers to plug in through a common interface.

❤️ Sponsor this project

We are currently looking for partners who want to sponsor hosting and development of the project.

Check out our Github Sponsors page here

Missing an entry? Please let us know.