EVERYTHING XIAOMI
Get listed

PHPMD

PHPMD is a free tool for inspecting PHP source code for potential bugs, inefficient or overly complex code, and unused parameters, methods, or properties.

Place
#17 of 33
Chart
Linters
Score
6.1
PHPMD's website

What PHPMD is

PHPMD is a free tool for inspecting PHP source code for potential bugs, inefficient or overly complex code, and unused parameters, methods, or properties. Its predefined rules cover clean code, code size, controversial practices, design, naming, and unused code. You can add custom rules, and security rules are supported. PHPMD can run in CI and produce reports or output for JSON, SARIF, Checkstyle-compatible, GitHub, and GitLab workflows, including a GitLab renderer for GitLab CI. It is available for Linux, macOS, Windows, and self-hosted setups. Installation options include a Phar, PHIVE, and Composer. The download page lists PHP >= 5.3.9 and PHP_Depend >= 2.0.0 as requirements. The project uses the BSD 3-Clause license, and its Phar files are signed with a public key associated with [email protected]. The homepage lists version 2.15.0, dated 2023/12/11, as its most recent release. Help is available through Gitter, while bugs and feature requests can be directed to the issue tracker.

Good

  • Free, with custom rules supported.
  • Checks for security issues and unused code.
  • CI support includes a GitLab renderer.
  • Install through Phar, PHIVE, or Composer.

Watch out

  • No autofix is listed.
  • No IDE support is listed.
  • Requires PHP >= 5.3.9 and PHP_Depend >= 2.0.0.
  • Latest release shown is dated 2023/12/11.

Who it suits

PHPMD suits PHP developers who want rule-based source analysis in a CI or self-hosted workflow. It is also relevant to teams that need custom rules or reports for GitLab and other listed formats.

Verdict

PHPMD provides PHP-focused rule checks, configurable rules, and several reporting options without a listed price. Check its PHP_Depend requirement and lack of autofix or IDE support against your workflow.

Plans and prices

From PHPMD's own pricing page, checked 7 Oct 2026.

All about pricing
PlanPriceWhat it gives you
PHPMDFreePHP source code analysis · BSD 3-Clause license

The facts

Each one read from PHPMD's own pages, with the date it was checked.

What it does

Analysis rules
Its predefined rules detect code smells and possible errors in analyzed source code.checked 7 Oct 2026
Enterprise support
The enterprise page offers PHPMD through the Tidelift Subscription, which describes commercial support and maintenance for open-source dependencies.checked 7 Oct 2026
GitLab CI
Release notes state that PHPMD added a GitLab renderer for GitLab CI.checked 7 Oct 2026
Installation
The site documents installation as a Phar, through PHIVE, or via Composer.checked 7 Oct 2026
Latest release shown
The homepage lists PHPMD 2.15.0, dated 2023/12/11, as its most recent release.checked 7 Oct 2026
License
The project site identifies PHPMD as licensed under the BSD 3-Clause license.checked 7 Oct 2026
PHP dependency
The download page lists PHP >= 5.3.9 and PHP_Depend >= 2.0.0 as requirements.checked 7 Oct 2026
Purpose
PHPMD analyzes PHP source code for possible bugs, suboptimal code, overcomplicated expressions, and unused parameters, methods, or properties.checked 7 Oct 2026
Reports
Release notes document JSON, SARIF, Checkstyle-compatible, GitHub, and GitLab report renderers or options.checked 7 Oct 2026
Rule categories
The documented rulesets cover clean code, code size, controversial practices, design, naming, and unused code.checked 7 Oct 2026
Signing
PHPMD Phar files are signed with a public key associated with [email protected].checked 7 Oct 2026
Support
The support page directs users to the Gitter channel for help and the issue tracker for bugs or feature requests.checked 7 Oct 2026

The company

Company details
The people page names Manuel Pichler as project founder and says he has been involved since 2009.checked 7 Oct 2026
Founded
2009checked 28 Sep 2026

Alternatives to PHPMD

All alternatives
  1. 1Cppcheck logo

    Cppcheck

    Free planOpen sourceLinuxmacOSSelf-hostedWindows
    7.4Free plan
  2. 2

    JSHint

    Free planOpen sourceWebAPIExtensionLinux
    7.4Free plan
  3. 3

    Flake8

    Free planOpen sourceAPILinuxmacOSSelf-hosted
    7.3Free plan
  4. 4

    PMD

    Free planLinuxmacOSSelf-hostedWindows
    6.8Free plan
  5. 5

    SwiftLint

    Free planLinuxmacOSWindows
    6.6Free plan
  6. 6Ruff logo

    Ruff

    Free planWebLinuxmacOSSelf-hosted
    6.5Free plan