PhpStorm 2026.2 Help

Mess Detector

On this page, enable and configure the Mess Detector quality tool.

Item

Description

Configuration

Select the required interpreter from the list. The list contains all the currently configured local and remote PHP interpreters. For more information, refer to Configure local PHP interpreters and Configure remote PHP interpreters.

Clicking the Browse button to the right of the drop-down list opens Mess Detector Dialog.

Show ignored files

Click to open the Mess Detector Ignored Files dialog, which lists the files that Mess Detector skips. PhpStorm suggests adding a new file to the list during inspection when waiting for response from the Mess Detector exceeds the limit specified in the Tool process timeout field. This is done to prevent slowing down processing. For each file, PhpStorm displays its name and location.

  • To add a file, click the Add button and locate the desired file in the dialog that opens.

  • To delete a file from the list and have Mess Detector process it again, select the file and click the Remove file button the Remove button.

  • To remove all the files from the list, click the Close button.

Options

  • To use predefined rules, in the Options area, select the checkboxes next to the validations to be performed.

  • To use a custom ruleset:

    1. Create and save one or several ruleset files. A valid ruleset file is an .xml file that contains the <ruleset> root element with the name attribute. For more information about custom rulesets, refer to http://phpmd.org/documentation/creating-a-ruleset.html.

    2. In the Custom rulesets area, click Add button and select the relevant rule definition file in the dialog that opens. When you click OK, a new item is added to the Custom rulesets list, where the Name field shows the ruleset name retrieved from the attribute name within the <ruleset> tag and the File field shows the location of the selected ruleset file.

Run mode

Configure how often Mess Detector is triggered to analyze code:

  • On the fly – Mess Detector runs automatically in the background. Issues are highlighted in the editor as you type.

  • On idle – Mess Detector runs after you stop typing and the inactivity period specified in the Idle threshold (ms) field passes.

  • On save – Mess Detector is triggered only when the file is saved either manually or via PhpStorm's autosave. Issue highlighting is updated only when the file state is persisted to disk.

Idle threshold (ms)

Define the delay time in milliseconds after code modification before Mess Detector runs.

Minimum interval (ms)

Define the minimum time in milliseconds that must pass between two consecutive runs of Mess Detector on the same file. This prevents Mess Detector from running too frequently in case of frequent file savings or heavy typing.

Mess Detector Dialog

The dialog opens when you click the Browse button next to the Configuration list on the Mess Detector page.

Use this dialog to configure the used PHP interpreter, path to the Mess Detector executable file, as well as Mess Detector's behaviour. For more information, refer to Mess Detector.

Item

Description

Interpreters pane

The left-hand pane of the dialog shows the default PHP interpreter to use the Mess Detector from. To add a different interpreter, click the Add button and select an item from the list of CLI interpreters configured in the project.

Mess Detector path

In this field, specify the location of the Mess Detector script: phpmd.bat for Windows or phpmd for Linux and macOS.

PhpStorm detects the path to the Mess Detector executable file in the vendor/bin folder and fills in the field automatically, but you can edit it if necessary. Type the path manually or click the Browse button and select the path in the dialog that opens.

To check that the specified path to phpmd.bat or phpmd ensures interaction between PhpStorm and Mess Detector, that is, the tool can be launched from PhpStorm and PhpStorm will receive problem reports from it, click the Validate button. This validation is equal to running the phpmd --version command. If validation passes successfully, PhpStorm displays the information on the detected Mess Detector version.

Tool process timeout

In this field, specify how long you want PhpStorm to wait for a result from Mess Detector. If the timeout is exceeded, the process is terminated to prevent excessive CPU and memory usage. This lets you fine-tune the Mess Detector process behavior depending on the configuration of your computer and the rule sets used.

29 May 2026