# Coding Standards (PHPCS and PHPMD)

Automated testing doesn’t mean just functionality — code quality and looks are important too! WordPress coding standards are enforced using the popular [PHP CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer) tool and code quality is being continuously checked using the [PHP Mess Detector](https://phpmd.org/) rules. The custom rules used by DWS are present in the *phpcs.xml.dist* and *phpmd.xml.dist* files in each public project on [GitHub](https://github.com/deep-web-solutions/).

Basically, this ensures that a few WordPress-specific errors can never occur as long as the tests pass. Here are some examples:

* All output is ran through an escaping function.
* All user input is ran through a sanitization function.
* All translatable strings use the same language domain.
* All global functions/variables/classes are prefixed properly.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://framework.deep-web-solutions.com/key-concepts-and-dev-tools/coding-standards-phpcs-and-phpmd.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
