PHPMD
PHPMD: A configurable, CI-ready PHP linter for teams focused on code quality and security. Ranked #26 of 33 in Linters by our editors (6.6/10); pricing: Free plan; best for PHP teams targeting maintainability and security.
At a glance
- Editor score6.6 / 10
- PricingFree plan
- Best forPHP teams targeting maintainability and security
- Free planYes
- Paid fromFree
- CI supportYes
- Founded2009
- Facts checked21 Sep 2026

Where it wins
- Built-in rules cover clean code, design, naming, size, and unused code
- Baselines help teams manage existing violations incrementally
- GitHub Actions and GitLab CI reporting fit established workflows
Where it doesn't
- Focused on PHP rather than multiple programming languages
- Command-line workflow may not suit teams seeking IDE support
- Automatic code fixing is not part of its documented capabilities
Our verdict on PHPMD
PHPMD is an open-source static analysis tool for PHP source files and directories. It is aimed at PHP teams that want repeatable checks for maintainability, security, design quality, naming, code size, unused code, and potential bugs. Analysis runs from the command line, making it a fit for development workflows and continuous integration rather than a broad, multi-language linting setup.
Its rule system is the main point of depth. PHPMD includes built-in rules for clean code, code size, design, naming, and unused code, while custom rule classes and configurable rule sets let teams shape checks around their standards. Priorities, thresholds, exclusions, and suppressions are configurable, and baseline generation and updating can help introduce analysis into an existing PHP codebase without treating every prior violation as a new failure. Reports are available in text, XML, HTML, JSON, GitHub, and GitLab formats.
PHPMD is available as open source with a free plan, and installation options include Phar, PHIVE, Composer, and a source repository. Its ecosystem fit is strongest in CI: GitHub Actions annotations and GitLab Code Quality reporting can surface findings where teams already review changes. The trade-off is a narrow PHP focus and a command-line-centered experience with no documented IDE support or automatic fixing. Choose PHPMD when configurable PHP rules, baselines, and CI reporting matter most; choose another tool when multi-language coverage or editor-integrated remediation is central.
Your product? Our editors can test PHPMD in depth and publish a review, labelled as paid · from $149/mo →
PHPMD pricing
PHPMD fact sheet
| Free plan | Yes |
|---|---|
| Paid from | Free |
| Languages supported | 1 |
| Autofix | No |
| Custom rules | Yes |
| Security rules | Yes |
| IDE support | None |
| CI support | Yes |
| Deployment | Self-hosted |
| Platforms | Windows, macOS, Linux |
| Support | Community, Docs, Tickets |
| Built for | Solo, Small business, Mid-market, Enterprise (editorial estimate) |
| Integrations | 5 integrations: GitHub Actions, GitLab CI, Apache Ant, Composer, PHIVE |
| Pricing | Free plan |
| Website | phpmd.org |
| Facts checked | 21 Sep 2026 |
PHPMD integrations
PHPMD lists 5 integrations on its own site.
- GitHub Actions
- GitLab CI
- Apache Ant
- Composer
- PHIVE
Alternatives to PHPMD
- ESLintA free, extensible JavaScript linter with autofix, plugins, and broad developer-tool integrations.9.4
- RuffFree Python linting and formatting with more than 900 built-in rules.9.2
- ShellCheckA free, open-source linter for shell syntax, portability, robustness and security checks.9.0
Used PHPMD? Be the first to review it
The editor score above is our own research. What this page doesn't have yet is a reader's view — what you used PHPMD for, what worked and what didn't. No stars are seeded and no review is paid for; an editor reads every one before it appears.
Write a reviewTwo minutes · verified accounts only · read by an editor before it appears
Featured on iTechGuides
PHPMD is listed in our Linters directory. Add the badge to your site — it links back to this page.
<a href="https://www.itechguides.com/products/phpmd/"><img src="https://www.itechguides.com/best/badge/phpmd.svg" alt="Featured on iTechGuides" width="230" height="46"></a>
Reviewed by iTechGuides Editors · Editorial team · Updated Oct 2026
Advertiser disclosure: iTechGuides is reader-supported. Vendors can pay for top positions in our rankings and for a place on other products' pages, and we may earn a commission when you click some links. Bought places stand at the number bought; this page and our disclosure say so. Paying vendors may get a fuller, more detailed review from our editors, and that review can change their score. How we rank.
Last updated · How we research and update


