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 |
|---|---|---|---|---|---|---|---|---|
| #5901 | Restricted Site Access | 91 | 14 | 11 | 10k+ | Missing Arg Domain | ||
| #5902 | SearchWP Modal Search Form | 91 | 9 | 9 | 5k+ | trademarked term | ||
| #5903 | Sensei LMS Post to Course Creator | 91 | 6 | 7 | 1k+ | Missing Translators Comment | ||
| #5904 | Serbian Addons for WooCommerce | 91 | 34 | 13 | 600 | Text Domain Mismatch | ||
| #5905 | Simple Google Analytics Tracking | 91 | 6 | 2 | 1k+ | Missing direct file access protection | ||
| #5906 | Simple Membership Form Shortcode | 91 | 7 | 1 | 2k+ | Missing direct file access protection | ||
| #5907 | Simply Show IDs | 91 | 5 | 1 | 3k+ | Missing direct file access protection | ||
| #5908 | Slim SEO – A Fast & Automated SEO Plugin For WordPress | 91 | 4 | 9 | 70k+ | Database parameter is not escaped | ||
| #5909 | Slivery Extender | 91 | 557 | 11 | 1k+ | Text Domain Mismatch | ||
| #5910 | Snow Monkey Forms | 91 | 36 | 41 | 30k+ | Non-prefixed global variable | ||
| #5911 | Super Light Cache Buster | 91 | 6 | 4 | 700 | Non-prefixed function | ||
| #5912 | Thememiles Toolset | 91 | 14 | 2 | 500 | Text Domain Mismatch | ||
| #5913 | WebAuthn Provider for Two Factor | 91 | 6 | 14 | 1k+ | Missing Arg Domain | ||
| #5914 | Unveil Lazy Load | 91 | 2 | 6 | 2k+ | error log error log | ||
| #5915 | Validated | 91 | 7 | 3 | 600 | Missing direct file access protection | ||
| #5916 | VenoBox Lightbox | 91 | 11 | 4 | 1k+ | Text Domain Mismatch | ||
| #5917 | WCFM – Multivendor Marketplace REST API for WooCommerce | 91 | 5 | 34 | 1k+ | Non-prefixed hook name | ||
| #5918 | WooCommerce New Product Badge | 91 | 8 | 8 | 800 | Text Domain Mismatch | ||
| #5919 | Bootstrap Blocks | 91 | 8 | 30 | 10k+ | Non-prefixed global variable | ||
| #5920 | Commerce7 for WordPress | 91 | 2 | 93 | 1k+ | Non-prefixed global variable | ||
| #5921 | WP Mobile Detect | 91 | 4 | 6 | 5k+ | trademarked term | ||
| #5922 | WP Session Manager | 91 | 5 | 16 | 2k+ | Direct Query | ||
| #5923 | WPS HTML Blocks | 91 | 23 | 4 | 1k+ | Text Domain Mismatch | ||
| #5924 | WPSSO Tune WP Image Editors | 91 | 35 | 10 | 900 | Missing Translators Comment | ||
| #5925 | DearFlip – PDF Flipbook, 3D Flipbook, PDF embed, PDF viewer | 92 | 10 | 11 | 200k+ | Missing direct file access protection | ||
| #5926 | Ads.txt Manager | 92 | 4 | 4 | 100k+ | Missing direct file access protection | ||
| #5927 | Table Field Add-on for ACF and SCF | 92 | 9 | 3 | 50k+ | Text Domain Mismatch | ||
| #5928 | Blazeo | 92 | 4 | 5 | 400 | Missing Version | ||
| #5929 | LB Back To Top | 92 | 4 | 2 | 700 | Missing Version | ||
| #5930 | Change Text Case | 92 | 4 | 1 | 2k+ | Missing Arg Domain | ||
| #5931 | Contact Form 7 Shortcode Enabler | 92 | 4 | 3 | 10k+ | trademarked term | ||
| #5932 | Control XML-RPC publishing | 92 | 7 | 0 | 400 | Text Domain Mismatch | ||
| #5933 | Cryptocurrency Widgets – Price Ticker & Coins List | 92 | 4 | 36 | 7k+ | Non-prefixed global variable | ||
| #5934 | Customizer Custom CSS | 92 | 5 | 2 | 400 | Deprecated parameter: load_plugin_textdomain parameter 2 | ||
| #5935 | Display Posts – Easy lists, grids, navigation, and more | 92 | 11 | 23 | 80k+ | Non-prefixed function | ||
| #5936 | ERE Colors – Essential Real Estate Add-On | 92 | 4 | 1 | 1k+ | Missing direct file access protection | ||
| #5937 | External Permalinks Redux | 92 | 9 | 8 | 2k+ | Non-prefixed hook name | ||
| #5938 | Find And Replace Text | 92 | 4 | 2 | 400 | Missing direct file access protection | ||
| #5939 | Find Posts Using Attachment | 92 | 4 | 2 | 1k+ | Missing direct file access protection | ||
| #5940 | Force Plugin Updates Check | 92 | 5 | 5 | 500 | trademarked term | ||
| #5941 | Google Photos embed | 92 | 2 | 5 | 700 | trademarked term | ||
| #5942 | Grid Shortcodes | 92 | 3 | 2 | 2k+ | Missing Version | ||
| #5943 | IndieAuth | 92 | 31 | 27 | 400 | Missing direct file access protection | ||
| #5944 | Lightweight Grid Columns | 92 | 4 | 2 | 10k+ | Missing Version | ||
| #5945 | LitCommerce: Multi-channel Selling Tool For WooCommerce | 92 | 4 | 3 | 2k+ | Missing direct file access protection | ||
| #5946 | OTP Login With Phone Number, OTP Verification | 92 | 3 | 23 | 900 | Non-prefixed hook name | ||
| #5947 | Block for Apple Maps | 92 | 14 | 3 | 1k+ | Missing direct file access protection | ||
| #5948 | MB ImageChimp RSS Feed Enhancer | 92 | 6 | 0 | 700 | wp function not compatible with requires wp | ||
| #5949 | Yoga Schedule Momoyoga | 92 | 3 | 2 | 1k+ | Missing Version | ||
| #5950 | Nelio A/B Testing – AB Tests and Heatmaps for Better Conversion Optimization | 92 | 18 | 290 | 5k+ | Non-prefixed hook name |