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 |
|---|---|---|---|---|---|---|---|---|
| #1101 | Hide Admin Bar Based on User Roles | 26 | 549 | 1,345 | 20k+ | Non-prefixed global variable | ||
| #1102 | Ibtana – WordPress Website Builder | 26 | 173 | 409 | 10k+ | Non-prefixed global variable | ||
| #1103 | Icegram Collect – Easy Form, Lead Collection and Subscription plugin | 26 | 423 | 292 | 2k+ | Output is not escaped | ||
| #1104 | Integrate Razorpay for Contact Form 7 | 26 | 152 | 97 | 500 | curl curl setopt | ||
| #1105 | Kadence Central – Site Management, Backups, Security, and Reporting | 26 | 462 | 213 | 30k+ | Text Domain Mismatch | ||
| #1106 | JustTables – WooCommerce Product Table | 26 | 534 | 652 | 600 | Non-prefixed global variable | ||
| #1107 | Kirki – Freeform Page Builder, Website Builder & Customizer | 26 | 191 | 803 | 500k+ | Nonce verification recommended | ||
| #1108 | Klarna for WooCommerce | 26 | 284 | 507 | 30k+ | Dynamic hook name | ||
| #1109 | Login Widget With Shortcode | 26 | 335 | 198 | 6k+ | wp function not compatible with requires wp | ||
| #1110 | MakeStories (for Google Web Stories) | 26 | 117 | 416 | 600 | Nonce verification recommended | ||
| #1111 | MaxGalleria | 26 | 278 | 560 | 2k+ | Non-prefixed global variable | ||
| #1112 | Media File Renamer: Rename for better SEO (AI-Powered) | 26 | 154 | 170 | 40k+ | Direct Query | ||
| #1113 | Hotel Booking | 26 | 690 | 940 | 4k+ | Unsafe printing function | ||
| #1114 | Omise Payments | 26 | 358 | 256 | 2k+ | Output is not escaped | ||
| #1115 | Online Contact Widget-多合一在线客服插件 | 26 | 708 | 80 | 800 | Non Singular String Literal Domain | ||
| #1116 | OOPSpam Anti-Spam: Spam Protection for WordPress Forms & Comments (No CAPTCHA) | 26 | 272 | 599 | 6k+ | Request data is not unslashed | ||
| #1117 | Open User Map – Interactive Leaflet Maps | 26 | 895 | 988 | 10k+ | Non-prefixed global variable | ||
| #1118 | Organic Builder Widgets – Simple WordPress Page Builder | 26 | 1,034 | 125 | 3k+ | Output is not escaped | ||
| #1119 | Paytium: Mollie payment forms & donations | 26 | 506 | 551 | 3k+ | Unsafe printing function | ||
| #1120 | LoginWP (Formerly Peter's Login Redirect) | 26 | 401 | 278 | 90k+ | Output is not escaped | ||
| #1121 | Crowdsignal Dashboard – Polls, Surveys & more | 26 | 481 | 491 | 200k+ | Unsafe printing function | ||
| #1122 | Polylang | 26 | 36 | 564 | 800k+ | Non-prefixed hook name | ||
| #1123 | Portfolio by BestWebSoft – Work and Projects Presentation Plugin for WordPress | 26 | 525 | 240 | 600 | Text Domain Mismatch | ||
| #1124 | Premmerce User Roles | 26 | 597 | 1,357 | 600 | Non-prefixed global variable | ||
| #1125 | Pressidium Cookie Consent | 26 | 203 | 95 | 10k+ | Exception output is not escaped | ||
| #1126 | Product Table For WooCommerce | 26 | 191 | 858 | 600 | Non-prefixed global variable | ||
| #1127 | Role Based Pricing for Woo by Meow Crew | 26 | 548 | 1,354 | 2k+ | Non-prefixed global variable | ||
| #1128 | Send Users Email – Email Subscribers, Email Marketing Newsletter | 26 | 188 | 415 | 5k+ | Non-prefixed global variable | ||
| #1129 | SEO Booster | 26 | 403 | 1,331 | 1k+ | Non-prefixed global variable | ||
| #1130 | SP Move Login | 26 | 881 | 215 | 6k+ | Text Domain Mismatch | ||
| #1131 | Video Gallery – Vimeo and YouTube Gallery | 26 | 561 | 794 | 6k+ | Non-prefixed global variable | ||
| #1132 | Carousel, Recent Post Slider and Banner Slider | 26 | 528 | 1,409 | 8k+ | Non-prefixed global variable | ||
| #1133 | StoreGrowth: Smart Sales Booster for WooCommerce | BOGO, Upsells, Direct Checkout, Quick View, Side Cart | 26 | 125 | 420 | 2k+ | Non-prefixed global variable | ||
| #1134 | Subscriber by BestWebSoft | 26 | 550 | 376 | 900 | Text Domain Mismatch | ||
| #1135 | SV Proven Expert | 26 | 747 | 380 | 900 | Output is not escaped | ||
| #1136 | Tag Groups is the Advanced Way to Display Your Taxonomy Terms | 26 | 351 | 232 | 3k+ | Unsafe printing function | ||
| #1137 | Theater for WordPress | 26 | 348 | 344 | 600 | Output is not escaped | ||
| #1138 | Ultimate Reviews | 26 | 515 | 345 | 500 | Output is not escaped | ||
| #1139 | UpdraftCentral Dashboard | 26 | 267 | 180 | 5k+ | Missing Translators Comment | ||
| #1140 | User Avatar | 26 | 104 | 173 | 4k+ | Non-prefixed constant | ||
| #1141 | User Submitted Posts – Enable Users to Submit Posts from the Front End | 26 | 699 | 396 | 10k+ | Text Domain Mismatch | ||
| #1142 | VikWidgetsLoader – Collection of Widgets | 26 | 1,182 | 538 | 1k+ | Output is not escaped | ||
| #1143 | Virtue/Ascend/Pinnacle Toolkit | 26 | 605 | 300 | 30k+ | Output is not escaped | ||
| #1144 | Visitors Online by BestWebSoft | 26 | 512 | 269 | 1k+ | Text Domain Mismatch | ||
| #1145 | Conditional Fees for WooCommerce Lite | 26 | 566 | 1,303 | 500 | Non-prefixed global variable | ||
| #1146 | Cart Abandonment Recovery for WooCommerce – Recover Lost Sales with Automated Emails | 26 | 51 | 325 | 300k+ | Direct Query | ||
| #1147 | Parcel Pro | 26 | 171 | 220 | 600 | Output is not escaped | ||
| #1148 | Premmerce SEO for WooCommerce | 26 | 550 | 1,285 | 1k+ | Non-prefixed global variable | ||
| #1149 | Set Price Note (Units, Offers, Editions) for WooCommerce | 26 | 596 | 1,307 | 800 | Non-prefixed global variable | ||
| #1150 | XL NMI Gateway for WooCommerce | 26 | 695 | 436 | 1k+ | Text Domain Mismatch |