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 |
|---|---|---|---|---|---|---|---|---|
| #5951 | OffCanvas / Drawer – Responsive Slide-In Drawer & Popup System | 92 | 6 | 2 | 900 | Missing direct file access protection | ||
| #5952 | Paste As Plain Text By Default | 92 | 2 | 5 | 2k+ | Nonce verification recommended | ||
| #5953 | PDF Thumbnails | 92 | 5 | 2 | 1k+ | Missing Arg Domain | ||
| #5954 | PhotoSwipe | 92 | 4 | 9 | 1k+ | Not In Footer | ||
| #5955 | Picture Gallery – Frontend Image Uploads, AJAX Photo List | 92 | 5 | 2 | 400 | date date | ||
| #5956 | Propovoice: All-in-One Client Management System | 92 | 13 | 41 | 800 | Non-prefixed global variable | ||
| #5957 | Remove RSS Feed | 92 | 5 | 0 | 1k+ | Missing Arg Domain | ||
| #5958 | RTL Tester | 92 | 6 | 2 | 1k+ | Nonce verification recommended | ||
| #5959 | MWW Scheduled Post Trigger | 92 | 4 | 2 | 60k+ | Direct Query | ||
| #5960 | Site Closed | 92 | 5 | 0 | 400 | Missing direct file access protection | ||
| #5961 | SmartEmailing | 92 | 7 | 3 | 600 | Missing direct file access protection | ||
| #5962 | Snow Monkey Blocks | 92 | 87 | 173 | 30k+ | Non-prefixed global variable | ||
| #5963 | Stencil | 92 | 6 | 8 | 1k+ | Non-prefixed function | ||
| #5964 | Themebeez Toolkit | 92 | 26 | 78 | 9k+ | Non-prefixed class | ||
| #5965 | TP WooCommerce Product Gallery | 92 | 4 | 9 | 1k+ | Non-prefixed function | ||
| #5966 | Ultimate Fonts | 92 | 6 | 3 | 400 | Missing Arg Domain | ||
| #5967 | User Access Shortcodes | 92 | 3 | 1 | 1k+ | Missing direct file access protection | ||
| #5968 | Verify domain for Apple Pay with Stripe | 92 | 3 | 2 | 600 | Input is not sanitized | ||
| #5969 | Menu Cart for WooCommerce | 92 | 102 | 16 | 80k+ | Text Domain Mismatch | ||
| #5970 | WP DPE-GES | 92 | 84 | 59 | 600 | Text Domain Mismatch | ||
| #5971 | WP Force SSL & HTTPS SSL Redirect | 92 | 18 | 21 | 90k+ | Non-prefixed global variable | ||
| #5972 | WP Quick Post Duplicator | 92 | 3 | 10 | 2k+ | trademarked term | ||
| #5973 | Advanced Views – Display Custom Fields (ACF, Pods, MetaBox), Posts, CPT and Woo Products anywhere in Gutenberg, Elementor, Divi, Beaver… | 93 | 32 | 43 | 3k+ | Non-prefixed global variable | ||
| #5974 | Advanced Responsive Video Embedder for Rumble, Odysee, YouTube, Vimeo, Kick … | 93 | 25 | 32 | 20k+ | Missing direct file access protection | ||
| #5975 | Advanced Testimonial Carousel For Elementor | 93 | 3 | 6 | 2k+ | Nonce verification recommended | ||
| #5976 | Section Builder with Backgrounds – Customize with Color, Gradient, Image and Parallax. | 93 | 2 | 7 | 1k+ | Non-prefixed global variable | ||
| #5977 | CF7 Mate – AI Form Builder, Styler & Multi-Step Forms for Contact Form 7 | 93 | 3 | 9 | 20k+ | Non-prefixed class | ||
| #5978 | Plugin de Clip para WooCommerce | 93 | 13 | 29 | 800 | Non-prefixed global variable | ||
| #5979 | Contextual Related Posts | 93 | 2 | 167 | 50k+ | Non-prefixed hook name | ||
| #5980 | Custom Post Type Sticky | 93 | 10 | 6 | 800 | Text Domain Mismatch | ||
| #5981 | Disable Blog | 93 | 2 | 22 | 10k+ | Non-prefixed global variable | ||
| #5982 | Disable Auto Update Emails and Block Updates for Plugins, WP Core, and Themes | 93 | 10 | 7 | 3k+ | Missing direct file access protection | ||
| #5983 | Social Sharing (by Danny) | 93 | 9 | 8 | 2k+ | Missing direct file access protection | ||
| #5984 | Easy Notify Lite | 93 | 26 | 45 | 400 | Missing Version | ||
| #5985 | Enable Mastodon Apps | 93 | 13 | 75 | 600 | Non-prefixed global variable | ||
| #5986 | Feed For TikTok Shop | 93 | 11 | 4 | 500 | wp function not compatible with requires wp | ||
| #5987 | Shipping Live Rates for DHL Express for WooCommerce | 93 | 4 | 11 | 600 | Non-prefixed global variable | ||
| #5988 | Huurkalender WP | 93 | 3 | 7 | 800 | trademarked term | ||
| #5989 | Image Carousel Module for Divi | 93 | 131 | 3 | 9k+ | Text Domain Mismatch | ||
| #5990 | Import Shopify To WP | 93 | 7 | 5 | 1k+ | Missing Translators Comment | ||
| #5991 | Kortez Toolset | 93 | 3 | 2 | 1k+ | Missing Translators Comment | ||
| #5992 | League Table – WordPress Table Plugin | 93 | 10 | 9 | 1k+ | Missing direct file access protection | ||
| #5993 | Local Google Fonts | 93 | 3 | 15 | 100k+ | Non-prefixed global variable | ||
| #5994 | ACF Photo Gallery Field | 93 | 2 | 3 | 60k+ | Input is not sanitized | ||
| #5995 | OptionTree | 93 | 165 | 2 | 50k+ | Text Domain Mismatch | ||
| #5996 | Pdf Embed | 93 | 4 | 4 | 10k+ | Non-prefixed global variable | ||
| #5997 | Contact Form & SMTP Plugin for WordPress by PirateForms | 93 | 14 | 102 | 30k+ | Non-prefixed hook name | ||
| #5998 | Quick Adsense | 93 | 31 | 26 | 20k+ | Missing direct file access protection | ||
| #5999 | Simple File List | 93 | 1 | 525 | 3k+ | Non-prefixed global variable | ||
| #6000 | Single Category Permalink | 93 | 5 | 12 | 400 | Non-prefixed global variable |