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 |
|---|---|---|---|---|---|---|---|---|
| #6151 | Block Patterns for Food Bloggers | 96 | 21 | 14 | 800 | Missing direct file access protection | ||
| #6152 | Booktics – Booking Calendar for Appointments and Service Businesses | 96 | 29 | 7 | 700 | wp function not compatible with requires wp | ||
| #6153 | Bulk Datetime Change | 96 | 3 | 18 | 6k+ | Non-prefixed global variable | ||
| #6154 | Bulk Delete | 96 | 2 | 26 | 30k+ | slow db query meta key | ||
| #6155 | Button Generator – Easily Create Custom Buttons with Icons and Analytics | 96 | 8 | 68 | 5k+ | Non-prefixed global variable | ||
| #6156 | Carousel Slider Block for Gutenberg | 96 | 48 | 12 | 40k+ | Text Domain Mismatch | ||
| #6157 | Autopreenchimento de endereço em formulários | 96 | 5 | 1 | 1k+ | Missing direct file access protection | ||
| #6158 | Cleanup HTML | 96 | 4 | 3 | 1k+ | Missing Version | ||
| #6159 | Cookie Wow PDPA Banner | 96 | 7 | 6 | 1k+ | Missing direct file access protection | ||
| #6160 | Custom Fields Permalink 2 | 96 | 4 | 9 | 500 | Non-prefixed global variable | ||
| #6161 | Custom Shortcodes | 96 | 5 | 2 | 6k+ | Missing direct file access protection | ||
| #6162 | Customer Reviews Collector for WooCommerce | 96 | 5 | 1 | 5k+ | Missing direct file access protection | ||
| #6163 | TinyMCE Recover | 96 | 5 | 1 | 600 | Missing direct file access protection | ||
| #6164 | Date Time Picker for WPForms | 96 | 7 | 4 | 1k+ | Text Domain Mismatch | ||
| #6165 | Default Sort Ascend | 96 | 5 | 1 | 500 | Missing direct file access protection | ||
| #6166 | Disable Admin Bar | 96 | 5 | 1 | 800 | Missing direct file access protection | ||
| #6167 | Disable / Hide Comment URL | 96 | 4 | 3 | 500 | Missing direct file access protection | ||
| #6168 | Disable Media Pages | 96 | 8 | 10 | 10k+ | Missing Translators Comment | ||
| #6169 | Disable WPautop | 96 | 4 | 4 | 2k+ | trademarked term | ||
| #6170 | Display PHP Version | 96 | 6 | 2 | 30k+ | Missing direct file access protection | ||
| #6171 | Doppler Easy Multichannel Marketing enhanced with IA | 96 | 11 | 6 | 600 | wp function not compatible with requires wp | ||
| #6172 | Easy Footnotes | 96 | 6 | 22 | 8k+ | Non-prefixed global variable | ||
| #6173 | Easy Hide Admin Menu Items | 96 | 43 | 11 | 1k+ | Text Domain Mismatch | ||
| #6174 | Edit Custom Fields | 96 | 10 | 19 | 2k+ | Direct Query | ||
| #6175 | Elastic Email Sender | 96 | 121 | 4 | 10k+ | Text Domain Mismatch | ||
| #6176 | Elegant Blog Themes Demo Importer | 96 | 22 | 13 | 500 | Text Domain Mismatch | ||
| #6177 | Elements Plus! | 96 | 11 | 20 | 6k+ | Non-prefixed function | ||
| #6178 | Enable SVG, WebP, and ICO Upload | 96 | 12 | 16 | 10k+ | Non-prefixed global variable | ||
| #6179 | Expand + Collapse Funk | 96 | 8 | 5 | 800 | Missing Arg Domain | ||
| #6180 | FancyBox | 96 | 5 | 3 | 4k+ | Not In Footer | ||
| #6181 | Fixed Bottom Menu | 96 | 15 | 45 | 5k+ | Non-prefixed hook name | ||
| #6182 | Shipping Live Rates for FedEx for WooCommerce | 96 | 4 | 10 | 2k+ | Non-prefixed global variable | ||
| #6183 | Shipping Live Rates for USPS for WooCommerce | 96 | 4 | 11 | 2k+ | Non-prefixed global variable | ||
| #6184 | Force Refresh | 96 | 15 | 13 | 4k+ | Missing direct file access protection | ||
| #6185 | Fresh Forms for Gravity | 96 | 7 | 6 | 3k+ | Non-prefixed constant | ||
| #6186 | GA Admin Taxonomy Search | 96 | 7 | 2 | 400 | Missing direct file access protection | ||
| #6187 | Genesis Connect for WooCommerce | 96 | 45 | 17 | 10k+ | Text Domain Mismatch | ||
| #6188 | German Slugs | 96 | 6 | 0 | 800 | Missing direct file access protection | ||
| #6189 | Gravity Forms Klaviyo Add-On | 96 | 28 | 15 | 1k+ | Text Domain Mismatch | ||
| #6190 | GF Upload to Email Attachment | 96 | 6 | 5 | 600 | error log print r | ||
| #6191 | Gutenberg Gallery Blocks Lightbox | 96 | 4 | 3 | 1k+ | Missing direct file access protection | ||
| #6192 | Gravity Pre-submission Confirmation | 96 | 5 | 2 | 800 | Missing direct file access protection | ||
| #6193 | Grow for WordPress | 96 | 7 | 5 | 10k+ | trademarked term | ||
| #6194 | Hide Comments Feature | 96 | 4 | 5 | 1k+ | Missing direct file access protection | ||
| #6195 | Hide WordPress Version | 96 | 5 | 4 | 400 | trademarked term | ||
| #6196 | Home Page Banner for Astra Theme | 96 | 45 | 2 | 2k+ | Text Domain Mismatch | ||
| #6197 | Image Size Selection for Divi | 96 | 60 | 3 | 500 | Text Domain Mismatch | ||
| #6198 | Kit (formerly ConvertKit) for WPForms | 96 | 11 | 16 | 1k+ | Non-prefixed global variable | ||
| #6199 | Ketchup Shortcodes | 96 | 9 | 1 | 400 | wp function not compatible with requires wp | ||
| #6200 | List Pages Shortcode | 96 | 5 | 9 | 5k+ | Non-prefixed hook name |