missing_direct_file_access_protection
Missing direct file access protection
A PHP file in the plugin can be loaded directly instead of through WordPress.
Why It Shows Up
Plugin Check found a PHP file without an early guard such as an ABSPATH check. Without that guard, a browser or script can request the file by path.
Why It Matters
Direct access can run code outside the normal WordPress bootstrap, expose output, or trigger assumptions about loaded functions, permissions, and request context.
How to Fix
- Add a guard near the top of PHP files that are not intended to be requested directly.
- Use `if ( ! defined( 'ABSPATH' ) ) { exit; }` before the file performs work or sends output.
- Keep template partials and bootstrap files protected too, not only the main plugin file.
Notes
- Files that are deliberately public endpoints should route through WordPress APIs or explicitly validate the request before doing work.
References
Affected Plugins
| Rank | Plugin | Score | Errors | Warnings | Installs | Added | Updated | Top Issue |
|---|---|---|---|---|---|---|---|---|
| #6251 | WooCommerce Product Details Customiser | 96 | 5 | 6 | 2k+ | trademarked term | ||
| #6252 | WP Author Slug | 96 | 16 | 6 | 2k+ | Text Domain Mismatch | ||
| #6253 | Content Filter – Censor All Offensive Content From Your Site | 96 | 17 | 6 | 500 | Text Domain Mismatch | ||
| #6254 | EditorFontsize | 96 | 5 | 2 | 500 | Missing direct file access protection | ||
| #6255 | WP Flipclock | 96 | 7 | 8 | 600 | Missing direct file access protection | ||
| #6256 | Htaccess File Editor – Safely Edit Htaccess File | 96 | 4 | 15 | 40k+ | Non-prefixed global variable | ||
| #6257 | WP Hyper Response | 96 | 6 | 2 | 4k+ | trademarked term | ||
| #6258 | WP Reset | 96 | 8 | 31 | 300k+ | Non-prefixed global variable | ||
| #6259 | WP REST API – Pure Taxonomies | 96 | 5 | 3 | 400 | trademarked term | ||
| #6260 | WP-REST-API V2 Menus | 96 | 5 | 4 | 3k+ | trademarked term | ||
| #6261 | WP-ShowHide | 96 | 6 | 5 | 10k+ | trademarked term | ||
| #6262 | Follow Us Badges | 96 | 7 | 9 | 1k+ | Non-prefixed global variable | ||
| #6263 | 301 Redirects & 404 Error Log | 97 | 4 | 20 | 30k+ | Non-prefixed global variable | ||
| #6264 | ACF Autosize | 97 | 3 | 5 | 4k+ | Non-prefixed hook name | ||
| #6265 | ACF: Better Search | 97 | 11 | 10 | 40k+ | Missing direct file access protection | ||
| #6266 | Acme Fix Images – Regenerate Thumbnails | 97 | 5 | 5 | 3k+ | Missing direct file access protection | ||
| #6267 | Add Category to Pages | 97 | 3 | 2 | 20k+ | Missing direct file access protection | ||
| #6268 | Add .html Extension to Pages | 97 | 4 | 1 | 700 | Missing direct file access protection | ||
| #6269 | Add HTML to Page | 97 | 5 | 0 | 400 | Missing direct file access protection | ||
| #6270 | Admin Bar Toggle | 97 | 6 | 3 | 400 | Missing Arg Domain | ||
| #6271 | Admin Color Schemes | 97 | 13 | 1 | 4k+ | Text Domain Mismatch | ||
| #6272 | Admin Menu Search | 97 | 5 | 0 | 3k+ | Missing Translators Comment | ||
| #6273 | Advanced Custom Fields Repeater & Flexible Content Fields Collapser | 97 | 3 | 5 | 4k+ | trademarked term | ||
| #6274 | Advanced Google reCAPTCHA | 97 | 3 | 15 | 200k+ | Non-prefixed global variable | ||
| #6275 | Advanced Rich Text Tools for Gutenberg | 97 | 3 | 4 | 3k+ | trademarked term | ||
| #6276 | AinoBlocks Accordion Faq Block | 97 | 3 | 3 | 600 | Missing direct file access protection | ||
| #6277 | All in One SEO – AI SEO Plugin to Boost SEO Rankings & Traffic (Schema, Local SEO, Sitemap & SEO Insights) | 97 | 20 | 4 | 3m+ | wp function not compatible with requires wp | ||
| #6278 | Allow Swf Upload | 97 | 6 | 0 | 400 | Missing direct file access protection | ||
| #6279 | Allow Webp image | 97 | 4 | 7 | 5k+ | Non-prefixed function | ||
| #6280 | Typing Effect | 97 | 7 | 5 | 10k+ | Text Domain Mismatch | ||
| #6281 | Anti-Spambot | 97 | 3 | 2 | 500 | Missing direct file access protection | ||
| #6282 | Article Word Count | 97 | 4 | 3 | 1k+ | Missing Arg Domain | ||
| #6283 | Aruba HiSpeed Cache | 97 | 12 | 5 | 100k+ | wp function not compatible with requires wp | ||
| #6284 | Autoset Featured Image | 97 | 5 | 0 | 1k+ | Missing direct file access protection | ||
| #6285 | Autopost for X (formerly Autoshare for Twitter) | 97 | 11 | 2 | 5k+ | Missing direct file access protection | ||
| #6286 | Before + After Images for Divi | 97 | 12 | 3 | 3k+ | Missing direct file access protection | ||
| #6287 | Better Section Navigation | 97 | 12 | 10 | 600 | Post Not In exclude | ||
| #6288 | Bloginfo Shortcode | 97 | 5 | 0 | 700 | Missing direct file access protection | ||
| #6289 | Candid Advanced Toolset | 97 | 10 | 2 | 1k+ | Missing direct file access protection | ||
| #6290 | Carousel for Divi | 97 | 4 | 0 | 1k+ | Missing direct file access protection | ||
| #6291 | Change Excerpt Length | 97 | 4 | 2 | 400 | Missing Arg Domain | ||
| #6292 | Classic Menu Block | 97 | 5 | 0 | 8k+ | Missing direct file access protection | ||
| #6293 | Clean Login | 97 | 2 | 13 | 6k+ | Non-prefixed hook name | ||
| #6294 | CodePen Embedded Pens Shortcode | 97 | 17 | 0 | 800 | wp function not compatible with requires wp | ||
| #6295 | Coldbox Addons | 97 | 11 | 2 | 800 | Missing direct file access protection | ||
| #6296 | Columns Reordering For Elementor | 97 | 4 | 2 | 900 | Missing direct file access protection | ||
| #6297 | Contact Form 7 IE DatePicker and Number Spinner Fix | 97 | 5 | 5 | 1k+ | trademarked term | ||
| #6298 | CubeWP Forms | 97 | 8 | 3 | 4k+ | wp function not compatible with requires wp | ||
| #6299 | Custom Alt Text for Elementor Images | 97 | 8 | 2 | 1k+ | Text Domain Mismatch | ||
| #6300 | Custom Currency Symbol for WooCommerce | 97 | 7 | 2 | 1k+ | Text Domain Mismatch |