Shipping a plugin means shipping code that runs on thousands of different sites. A short audit before launch catches the problems that cause support tickets, bad reviews and, worst of all, security reports. Use this checklist on every release, not only the first.
1. Security
- Escape output with
esc_html(),esc_attr(),esc_url()andwp_kses_post()as appropriate. - Sanitise input with functions such as
sanitize_text_field()and validate it against expected values. - Use nonces on every form and action, and verify them.
- Check capabilities with
current_user_can()before any privileged action. - Use prepared statements with
$wpdb->prepare()for database queries. - Do not trust REST and AJAX input. Set a permission callback on every route.
- Protect files against direct access.
2. Performance
- Load scripts and styles only on the screens that need them.
- Avoid database queries inside loops and on every request when a transient or cache will do.
- Do not autoload large options.
- Test with Query Monitor for slow queries and hooks.
3. Compatibility
- Test on the current and previous WordPress versions and on every PHP version you claim to support.
- Declare the minimum versions in the plugin header and readme.
- Test alongside popular plugins and themes, and with and without WooCommerce if relevant.
- Run the official Plugin Check tool and fix its findings.
4. Coding standards and quality
- Run PHP_CodeSniffer with the WordPress coding standards.
- Prefix functions, classes, options and hooks to avoid collisions.
- Add automated tests for the core logic.
- Enable error logging in development and clear every notice and deprecation.
5. Accessibility and internationalisation
- Make admin screens keyboard-usable, with visible focus and proper labels.
- Do not rely on colour alone to convey meaning.
- Wrap strings in translation functions and load a text domain.
6. Data handling and uninstall
- Document what data you collect and where it is sent. Add an opt-in for any tracking.
- Provide an
uninstall.phpor hook that removes options, tables and scheduled events when the plugin is deleted. - Support the privacy tools for data export and erasure if you store personal data.
7. Distribution and support
- Write a clear readme with a changelog, installation steps and FAQ.
- Follow the WordPress.org plugin guidelines if you plan to host there.
- Have a way to receive security reports and a plan to respond quickly.
- Version releases and keep release notes honest about breaking changes.
Final thoughts
Most plugin incidents come from the same short list: unescaped output, missing capability checks and unsafe queries. Make the checklist part of your release process and automate what you can.
Frequently asked questions
Is there an official tool to check a plugin?
Yes. WordPress.org provides the Plugin Check plugin, which scans for common issues and guideline violations.
How often should I run an audit?
Before every release, with a deeper review at least yearly or after major changes.



