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 |
|---|---|---|---|---|---|---|---|---|
| #4801 | Simple Calendar – Advanced Custom Fields | 67 | 18 | 6 | 400 | Output is not escaped | ||
| #4802 | Simple HTTPS | 67 | 17 | 13 | 400 | Output is not escaped | ||
| #4803 | Simple Membership Custom Messages | 67 | 47 | 0 | 7k+ | Text Domain Mismatch | ||
| #4804 | WP Forms + Sprout Invoices – Easy Invoice & Quote Submissions | 67 | 40 | 12 | 400 | Text Domain Mismatch | ||
| #4805 | Text Expander | 67 | 50 | 15 | 600 | wp function not compatible with requires wp | ||
| #4806 | Theme Check | 67 | 143 | 6 | 20k+ | Missing Translators Comment | ||
| #4807 | BitPay Gateway for WooCommerce | 67 | 64 | 21 | 400 | Text Domain Mismatch | ||
| #4808 | WebToffee WooCommerce Product Feeds – Google Shopping, Pinterest, TikTok Ads, & More | 67 | 178 | 2,899 | 2k+ | Non-prefixed hook name | ||
| #4809 | Widget Contact Form 7 | 67 | 22 | 2 | 1k+ | Output is not escaped | ||
| #4810 | WP-Copyright-Protection | 67 | 24 | 5 | 5k+ | wp function not compatible with requires wp | ||
| #4811 | WP Image Zoom | 67 | 30 | 46 | 10k+ | Non-prefixed global variable | ||
| #4812 | JAMstack Deployments | 67 | 33 | 3 | 1k+ | Short PHP open tag found | ||
| #4813 | WP Post Branches | 67 | 16 | 12 | 4k+ | Nonce verification recommended | ||
| #4814 | wp-Typography | 67 | 91 | 33 | 20k+ | Missing direct file access protection | ||
| #4815 | ACF: Yandex Maps Field | 68 | 73 | 10 | 800 | Text Domain Mismatch | ||
| #4816 | Auto Image Title & Alt | 68 | 13 | 4 | 400 | Missing direct file access protection | ||
| #4817 | Book Previewer for Woocommerce | 68 | 23 | 40 | 1k+ | Non-prefixed global variable | ||
| #4818 | Member Swipe for BuddyPress | 68 | 9 | 13 | 500 | Missing direct file access protection | ||
| #4819 | Category Featured Images | 68 | 5 | 12 | 600 | Input is not sanitized | ||
| #4820 | Clearout Email Validator – Real-Time Email Verification on WordPress Forms | 68 | 21 | 80 | 600 | Non-prefixed function | ||
| #4821 | Collapsing Categories | 68 | 29 | 8 | 4k+ | Missing direct file access protection | ||
| #4822 | Controls for Contact Form 7 (Redirects, Analytics & Tracking) | 68 | 4 | 14 | 10k+ | Missing nonce verification | ||
| #4823 | ConvertBox Auto Embed WordPress plugin | 68 | 18 | 10 | 5k+ | Missing direct file access protection | ||
| #4824 | Desert Companion | 68 | 412 | 837 | 20k+ | Non-prefixed global variable | ||
| #4825 | Exchange Rates Today | 68 | 9 | 10 | 400 | Non-prefixed function | ||
| #4826 | Expire Sticky Posts | 68 | 16 | 8 | 1k+ | Text Domain Mismatch | ||
| #4827 | Export media with selected content (by DKZR) | 68 | 10 | 14 | 40k+ | Direct Query | ||
| #4828 | Fatal Error Notify | 68 | 10 | 12 | 6k+ | Request data is not unslashed | ||
| #4829 | Free Assets Library – Openverse/Pixabay 600+ Million Images | 68 | 44 | 36 | 4k+ | Text Domain Mismatch | ||
| #4830 | Guestplan Booking Widget | 68 | 43 | 6 | 1k+ | Text Domain Mismatch | ||
| #4831 | Hreflang Manager – Hreflang Implementation for International SEO | 68 | 21 | 15 | 8k+ | wp function not compatible with requires wp | ||
| #4832 | Mailster Contact Form 7 | 68 | 35 | 20 | 1k+ | Text Domain Mismatch | ||
| #4833 | ミエルカヒートマップ タグマネージャー | 68 | 9 | 11 | 800 | Input is not validated | ||
| #4834 | News Magazine X Core | 68 | 63 | 30 | 5k+ | Missing Translators Comment | ||
| #4835 | Pinterest Verify Meta Tag | 68 | 20 | 6 | 600 | Output is not escaped | ||
| #4836 | POS Entegratör – Gurmehub Ödeme Eklentisi | 68 | 1,321 | 69 | 1k+ | Text Domain Mismatch | ||
| #4837 | Hide Title | 68 | 13 | 6 | 900 | Output is not escaped | ||
| #4838 | Postepay Gateway per Woocommerce | 68 | 36 | 4 | 1k+ | Text Domain Mismatch | ||
| #4839 | Custom Form Builder, Contact Forms, Payment Forms, Surveys, Polls | 68 | 21 | 18 | 900 | Output is not escaped | ||
| #4840 | Protection Against DDoS | 68 | 22 | 5 | 3k+ | Output is not escaped | ||
| #4841 | Reusable Gutenberg Blocks Widget | 68 | 24 | 9 | 500 | Output is not escaped | ||
| #4842 | Series | 68 | 55 | 6 | 2k+ | Text Domain Mismatch | ||
| #4843 | SKT Page Builder | 68 | 15 | 49 | 2k+ | Missing nonce verification | ||
| #4844 | Smartarget – Chat Buttons & Engagement Apps | 68 | 31 | 11 | 1k+ | Non Singular String Literal Domain | ||
| #4845 | Template List Metabox | 68 | 14 | 10 | 900 | Missing Arg Domain | ||
| #4846 | Increase Maximum Upload File Size | 68 | 28 | 14 | 40k+ | Missing Arg Domain | ||
| #4847 | Export and Import Users and Customers | 68 | 223 | 662 | 60k+ | Non-prefixed global variable | ||
| #4848 | Video Tab For WooCommerce | 68 | 7 | 13 | 600 | Missing nonce verification | ||
| #4849 | Product Category Slider for WooCommerce | 68 | 21 | 104 | 800 | Non-prefixed hook name | ||
| #4850 | WP and Divi Icons | 68 | 201 | 56 | 2k+ | wp function not compatible with requires wp |