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 |
|---|---|---|---|---|---|---|---|---|
| #6401 | Show Current Template | 97 | 4 | 1 | 100k+ | Discouraged text-domain loading | ||
| #6402 | Show Menu Shortcode | 97 | 5 | 0 | 400 | Missing direct file access protection | ||
| #6403 | Show User ID | 97 | 4 | 3 | 800 | Non-prefixed function | ||
| #6404 | ShowID for Post/Page/Category/Tag/Comment | 97 | 5 | 1 | 8k+ | Missing direct file access protection | ||
| #6405 | Simple Analytics | 97 | 6 | 3 | 1k+ | Missing Translators Comment | ||
| #6406 | Simple Blog Card | 97 | 6 | 18 | 3k+ | Non-prefixed global variable | ||
| #6407 | Simple GDPR Cookie Compliance | 97 | 10 | 16 | 6k+ | Non-prefixed global variable | ||
| #6408 | Simple Iframe | 97 | 5 | 0 | 6k+ | Missing direct file access protection | ||
| #6409 | Simple Content Templates for Blog Posts & Pages | 97 | 5 | 8 | 1k+ | Direct Query | ||
| #6410 | Simple SMTP | 97 | 3 | 10 | 2k+ | Non-prefixed hook name | ||
| #6411 | Simple Social Icons | 97 | 4 | 3 | 100k+ | Missing direct file access protection | ||
| #6412 | Sirvoy Booking Engine | 97 | 4 | 1 | 1k+ | Missing direct file access protection | ||
| #6413 | Image and video gallery from Google Drive | 97 | 15 | 1 | 4k+ | Missing direct file access protection | ||
| #6414 | Slideshow | 97 | 4 | 2 | 1k+ | Post Not In exclude | ||
| #6415 | Slimbox | 97 | 4 | 1 | 600 | Missing direct file access protection | ||
| #6416 | Sopro | 97 | 4 | 4 | 500 | Non-prefixed function | ||
| #6417 | SP RTL (RusToLat) | 97 | 5 | 0 | 2k+ | Missing direct file access protection | ||
| #6418 | Speed up Contact Form 7 | 97 | 11 | 0 | 400 | wp function not compatible with requires wp | ||
| #6419 | Sticky Menu & Sticky Header | 97 | 4 | 23 | 100k+ | Non-prefixed global variable | ||
| #6420 | StylizedX – Variation Switcher Dark Mode for Full Site Editing (FSE) Themes | 97 | 4 | 2 | 2k+ | block api version too low | ||
| #6421 | Super Emoji Plus+ | 97 | 3 | 2 | 1k+ | Missing direct file access protection | ||
| #6422 | Superb Helper | 97 | 5 | 32 | 8k+ | Non-prefixed global variable | ||
| #6423 | SVGator | 97 | 15 | 0 | 1k+ | Missing direct file access protection | ||
| #6424 | Syncee Premium Dropshipping & Wholesale | 97 | 50 | 3 | 1k+ | Text Domain Mismatch | ||
| #6425 | Tabs Block | 97 | 3 | 8 | 400 | Missing Version | ||
| #6426 | Taxonomy Dropdown Widget | 97 | 6 | 2 | 2k+ | wp function not compatible with requires wp | ||
| #6427 | Themes Artist Demo Importer | 97 | 75 | 6 | 1k+ | Text Domain Mismatch | ||
| #6428 | TinyMCE Clear Float | 97 | 2 | 4 | 10k+ | Missing direct file access protection | ||
| #6429 | TinyMCE Smiley Button | 97 | 3 | 3 | 600 | Missing Version | ||
| #6430 | Tutor LMS BunnyNet Integration | 97 | 2 | 13 | 1k+ | Non-prefixed global variable | ||
| #6431 | Twentig Supercharged Block Editor – Blocks, Patterns, Starter Sites, Portfolio | 97 | 12 | 70 | 20k+ | Text Domain Mismatch | ||
| #6432 | Adobe Fonts (formerly Typekit) for WordPress | 97 | 3 | 5 | 10k+ | trademarked term | ||
| #6433 | Unique Headers | 97 | 12 | 6 | 10k+ | Missing Translators Comment | ||
| #6434 | URL ShortCodes | 97 | 4 | 1 | 2k+ | Missing direct file access protection | ||
| #6435 | User Shortcodes | 97 | 4 | 13 | 1k+ | Non-prefixed global variable | ||
| #6436 | Watermark RELOADED | 97 | 6 | 3 | 700 | Non-prefixed constant | ||
| #6437 | Change Currency Symbol for WooCommerce | 97 | 6 | 1 | 600 | Text Domain Mismatch | ||
| #6438 | Responsive Videos by Angie Makes | 97 | 5 | 2 | 600 | Missing direct file access protection | ||
| #6439 | WebConnex Form Management | 97 | 3 | 13 | 500 | Missing Version | ||
| #6440 | What Template | 97 | 6 | 0 | 1k+ | Missing Arg Domain | ||
| #6441 | WN Elementor Glassy Columns | 97 | 11 | 2 | 1k+ | Text Domain Mismatch | ||
| #6442 | Custom Fee Woocommerce | 97 | 24 | 3 | 400 | Text Domain Mismatch | ||
| #6443 | Woobox | 97 | 5 | 3 | 1k+ | trademarked term | ||
| #6444 | WooCommerce Product Image Flipper | 97 | 3 | 5 | 3k+ | trademarked term | ||
| #6445 | WP Author, Date and Meta Remover | 97 | 4 | 3 | 10k+ | trademarked term | ||
| #6446 | Bloginfo Shortcode | 97 | 4 | 1 | 700 | Missing direct file access protection | ||
| #6447 | WP Favicon Remover | 97 | 3 | 4 | 10k+ | trademarked term | ||
| #6448 | WP Fluid Images | 97 | 4 | 3 | 400 | trademarked term | ||
| #6449 | Contact Listing for WP Job Manager | 97 | 5 | 5 | 6k+ | trademarked term | ||
| #6450 | LightPress Lightbox | 97 | 33 | 4 | 40k+ | Text Domain Mismatch |