Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Mess Detector for PHPNew to Visual Studio Code? Get it now.
Mess Detector for PHP

Mess Detector for PHP

Anton Vix

|
3 installs
| (0) | Free
PHP Mess Detector integration for Visual Studio Code
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

PHPMD for VS Code

PHP Mess Detector integration for Visual Studio Code.

Features

  • Analyze the current PHP file via command palette or editor context menu
  • Analyze multiple files and folders via Explorer context menu
  • Inline diagnostics — lint on save highlights violations without leaving the editor
  • Output channel with detailed PHPMD output
  • Configurable rulesets, minimum priority, and executable path

Requirements

  • PHPMD installed globally or in the project:
composer global require phpmd/phpmd
# or
composer require --dev phpmd/phpmd

Configuration

Setting Type Default Description
phpmd.enabled boolean true Enable or disable the extension
phpmd.executablePath string "phpmd" Path to the PHPMD executable. Supports ${workspaceFolder}, ~
phpmd.rulesets string "cleancode,codesize,controversial,design,naming,unusedcode" Comma-separated rulesets or path to a custom ruleset XML file
phpmd.minimumPriority number 5 Report violations with priority ≤ this value (1 = highest)
phpmd.lintOnSave boolean false Run PHPMD on save and show inline diagnostics
phpmd.timeout number 60000 Maximum time (ms) to wait for PHPMD

Example .vscode/settings.json

{
    "phpmd.enabled": true,
    "phpmd.executablePath": "${workspaceFolder}/vendor/bin/phpmd",
    "phpmd.rulesets": "cleancode,codesize,naming,unusedcode",
    "phpmd.minimumPriority": 3,
    "phpmd.lintOnSave": true
}

Commands

Command Description
PHPMD: Analyze Current File Run PHPMD on the active PHP file
PHPMD: Analyze Selected Files/Folders Run PHPMD on items selected in the Explorer
PHPMD: Show Output Open the PHPMD output channel

License

MIT

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft