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 |
|---|---|---|---|---|---|---|---|---|
| #6001 | Skyword Publishing API | 93 | 49 | 15 | 400 | wp function not compatible with requires wp | ||
| #6002 | Teachable | 93 | 19 | 75 | 500 | Non-prefixed global variable | ||
| #6003 | The Simplest Favicon | 93 | 3 | 0 | 700 | Missing direct file access protection | ||
| #6004 | Themx Maximum Upload File Size | Increase Maximum Upload File Size | 93 | 17 | 14 | 1k+ | Text Domain Mismatch | ||
| #6005 | Use Administrator Password | 93 | 2 | 4 | 900 | Non-prefixed hook name | ||
| #6006 | Product Author for WooCommerce | 93 | 3 | 6 | 500 | Missing direct file access protection | ||
| #6007 | SharkDropship & Affiliate for AliExpress, eBay, Amazon, Etsy and Temu | 93 | 105 | 23 | 500 | Text Domain Mismatch | ||
| #6008 | Payment Gateway bKash for WC | 93 | 96 | 7 | 1k+ | Text Domain Mismatch | ||
| #6009 | External Links – nofollow, noopener & new window | 93 | 24 | 67 | 90k+ | Non-prefixed global variable | ||
| #6010 | WP Menu Cart | 93 | 11 | 15 | 7k+ | Non-prefixed hook name | ||
| #6011 | 404 Redirection | 94 | 4 | 2 | 7k+ | Missing direct file access protection | ||
| #6012 | 404 to Home | 94 | 6 | 1 | 1k+ | wp function not compatible with requires wp | ||
| #6013 | ACF Options For Polylang | 94 | 9 | 23 | 10k+ | Non-prefixed constant | ||
| #6014 | Addonify Floating Cart For WooCommerce | 94 | 18 | 121 | 1k+ | Non-prefixed global variable | ||
| #6015 | Advanced Sidebar Menu | 94 | 5 | 117 | 10k+ | Non-prefixed hook name | ||
| #6016 | Automatically Update Permalinks | 94 | 2 | 2 | 2k+ | Missing nonce verification | ||
| #6017 | Better 404 Redirect To Homepage | 94 | 3 | 3 | 600 | Missing direct file access protection | ||
| #6018 | Blogger To WordPress | 94 | 15 | 4 | 3k+ | Missing direct file access protection | ||
| #6019 | Certify – Certificate Management & Verification | 94 | 2 | 2 | 500 | Database parameter is not escaped | ||
| #6020 | Coinbase Commerce Payment Gateway for WooCommerce | 94 | 21 | 5 | 4k+ | Missing Arg Domain | ||
| #6021 | Custom Image Sizes by 99 Robots | 94 | 35 | 26 | 600 | Text Domain Mismatch | ||
| #6022 | Disable woocommerce logout confirmation | 94 | 3 | 3 | 700 | trademarked term | ||
| #6023 | Disk Usage Insights | 94 | 3 | 20 | 1k+ | Non-prefixed global variable | ||
| #6024 | Easy Theme and Plugin Upgrades | 94 | 29 | 20 | 70k+ | Discouraged PHP function | ||
| #6025 | Flawless Themes Demo Importer | 94 | 39 | 11 | 1k+ | Text Domain Mismatch | ||
| #6026 | فرم ساز فرم افزار | 94 | 8 | 9 | 500 | Non Enqueued Script | ||
| #6027 | GHL Contact Form 7 Bridge – Send Contact Form 7 leads to GHL CRM | 94 | 6 | 17 | 400 | Non-prefixed global variable | ||
| #6028 | Gravity Forms IBAN | 94 | 7 | 21 | 500 | Non-prefixed function | ||
| #6029 | Gravity Forms Zero Spam | 94 | 4 | 9 | 100k+ | trademarked term | ||
| #6030 | Hello Plus | 94 | 15 | 38 | 80k+ | Post Not In exclude | ||
| #6031 | LLMs.txt and LLMs-Full.txt Generator | 94 | 14 | 9 | 4k+ | Non-prefixed global variable | ||
| #6032 | Login Lockdown & Protection | 94 | 5 | 15 | 100k+ | Non-prefixed global variable | ||
| #6033 | Magyar Video Embed | 94 | 5 | 9 | 1k+ | Non-prefixed function | ||
| #6034 | Marquee Addons for Elementor – Essential Motion Widgets & Templates | 94 | 2 | 24 | 20k+ | Post Not In exclude | ||
| #6035 | MobileMonkey X-Ray Installer | 94 | 4 | 3 | 400 | Missing direct file access protection | ||
| #6036 | Moving Media Library | 94 | 3 | 27 | 2k+ | Direct Query | ||
| #6037 | No-Indexer | 94 | 5 | 6 | 500 | Non-prefixed function | ||
| #6038 | Podbean Shortcode | 94 | 22 | 2 | 900 | wp function not compatible with requires wp | ||
| #6039 | Post Category Prev-Next Link Fix | 94 | 3 | 4 | 1k+ | Missing direct file access protection | ||
| #6040 | Regiones de Chile para WooCommerce | 94 | 7 | 4 | 400 | trademarked term | ||
| #6041 | Clean Filenames | 94 | 2 | 4 | 3k+ | Missing nonce verification | ||
| #6042 | Sch.gr Commons | 94 | 6 | 5 | 1k+ | Discouraged text-domain loading | ||
| #6043 | Seamless Sticky Custom Post Types | 94 | 8 | 5 | 1k+ | Missing Arg Domain | ||
| #6044 | Shortcode | 94 | 6 | 45 | 500 | Direct Query | ||
| #6045 | Simple Author Box | 94 | 12 | 61 | 90k+ | Non-prefixed global variable | ||
| #6046 | Simple Lightbox for WordPress | 94 | 11 | 7 | 400 | Non Enqueued Script | ||
| #6047 | SKT Blocks – Gutenberg based Page Builder | 94 | 14 | 25 | 1k+ | Non-prefixed function | ||
| #6048 | Tada: Instant Webpage Loading, Fast Website Browsing | 94 | 8 | 1 | 500 | Missing direct file access protection | ||
| #6049 | Visual Composer Templates Library | 94 | 25 | 11 | 600 | Missing direct file access protection | ||
| #6050 | WC City Select | 94 | 406 | 16 | 3k+ | Missing Arg Domain |