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 |
|---|---|---|---|---|---|---|---|---|
| #201 | Happyforms – Form Builder for WordPress: Drag & Drop Contact Forms, Surveys, Payments & Multipurpose Forms | 22 | 1,037 | 722 | 20k+ | Unsafe printing function | ||
| #202 | HeadSpace2 SEO | 22 | 940 | 360 | 3k+ | Text Domain Mismatch | ||
| #203 | Hesabfa Accounting | 22 | 467 | 718 | 400 | Text Domain Mismatch | ||
| #204 | Heureka | 22 | 557 | 254 | 400 | Exception output is not escaped | ||
| #205 | History Log by click5 | 22 | 675 | 1,290 | 400 | Direct Query | ||
| #206 | IMPress for IDX Broker | 22 | 1,085 | 636 | 6k+ | Text Domain Mismatch | ||
| #207 | Insert or Embed Articulate Content into WordPress | 22 | 659 | 1,437 | 2k+ | Non-prefixed global variable | ||
| #208 | The Innovative Form Builder – IvyForms | 22 | 713 | 250 | 600 | Exception output is not escaped | ||
| #209 | InfiniteWP Client | 22 | 2,286 | 1,812 | 200k+ | Exception output is not escaped | ||
| #210 | Import WP – Export and Import CSV and XML files to WordPress | 22 | 580 | 330 | 4k+ | Exception output is not escaped | ||
| #211 | JCC Payment Gateway for Woocommerce | 22 | 2,273 | 1,136 | 600 | Text Domain Mismatch | ||
| #212 | JCH Optimize | 22 | 1,145 | 136 | 4k+ | Output is not escaped | ||
| #213 | Jetpack – WP Security, Backup, Speed, & Growth | 22 | 2,975 | 1,348 | 3m+ | Text Domain Mismatch | ||
| #214 | Jim Soft Swiss QR Invoice | 22 | 262 | 392 | 400 | Non-prefixed global variable | ||
| #215 | LearnPress – WordPress LMS Plugin for Create and Sell Online Courses | 22 | 2,369 | 3,349 | 70k+ | Non-prefixed global variable | ||
| #216 | Custom Login Page Customizer – Login Designer | 22 | 588 | 1,455 | 30k+ | Non-prefixed global variable | ||
| #217 | Mail Baby SMTP | 22 | 385 | 699 | 600 | SQL query is not prepared | ||
| #218 | MailOptin – Popup, Optin Forms & Email Newsletters for Mailchimp, HubSpot, AWeber Etc. | 22 | 2,625 | 2,458 | 10k+ | Output is not escaped | ||
| #219 | MarketKing — Ultimate WooCommerce Multivendor Marketplace Solution | 22 | 1,131 | 1,844 | 800 | Non-prefixed global variable | ||
| #220 | Slider, Gallery, and Carousel by MetaSlider – Image Slider, Video Slider | 22 | 207 | 323 | 500k+ | Non-prefixed global variable | ||
| #221 | Modula Image Gallery – Photo Grid & Video Gallery | 22 | 474 | 436 | 100k+ | Text Domain Mismatch | ||
| #222 | Molongui Authorship – Author Boxes, Guest Authors & Co-Authors for WordPress | 22 | 919 | 1,230 | 10k+ | Output is not escaped | ||
| #223 | Motors – Car Dealership & Classified Listings Plugin | 22 | 5,340 | 5,959 | 9k+ | Text Domain Mismatch | ||
| #224 | myCred Addons – Ultimate myCred Modules To Support WordPress Gamification and Loyalty Rewards | 22 | 2,344 | 1,320 | 400 | Output is not escaped | ||
| #225 | Newsletters | 22 | 2,968 | 2,248 | 2k+ | Text Domain Mismatch | ||
| #226 | NinjaFirewall (WP Edition) – Advanced Security Plugin and Firewall | 22 | 1,272 | 2,063 | 100k+ | Non-prefixed global variable | ||
| #227 | WP OAuth Server (OAuth Authentication) | 22 | 189 | 347 | 3k+ | Non-prefixed function | ||
| #228 | oik | 22 | 489 | 180 | 2k+ | Non Singular String Literal Domain | ||
| #229 | Packeta | 22 | 801 | 333 | 8k+ | Exception output is not escaped | ||
| #230 | PagBank / PagSeguro Connect para WooCommerce | 22 | 505 | 757 | 4k+ | Non-prefixed global variable | ||
| #231 | PAYCOMET for WooCommerce | 22 | 1,206 | 423 | 2k+ | Text Domain Mismatch | ||
| #232 | PDF Builder for WPForms | 22 | 321 | 266 | 900 | SQL query is not prepared | ||
| #233 | Smart Popup by Supsystic | 22 | 3,172 | 503 | 10k+ | Non Singular String Literal Domain | ||
| #234 | Post SMTP – Complete Email Deliverability and SMTP Solution with Email Logs, Alerts, Backup SMTP & Mobile App | 22 | 1,581 | 2,326 | 300k+ | Non-prefixed global variable | ||
| #235 | Premium Addons for Elementor – Powerful Elementor Templates & Widgets | 22 | 233 | 1,036 | 700k+ | Non-prefixed hook name | ||
| #236 | Prime Mover – Migrate WordPress Website & Backups | 22 | 1,326 | 1,600 | 10k+ | Non-prefixed global variable | ||
| #237 | Product Catalog Feed by PixelYourSite | 22 | 581 | 357 | 8k+ | Output is not escaped | ||
| #238 | Pronamic Pay | 22 | 258 | 1,077 | 2k+ | Non-prefixed global variable | ||
| #239 | PageSpeed Ninja – Cache, Minify, Defer CSS JavaScript, Critical CSS, Optimize Images, Convert WebP | 22 | 984 | 407 | 5k+ | Unsafe printing function | ||
| #240 | Quick Contact Form | 22 | 260 | 623 | 1k+ | Non-prefixed function | ||
| #241 | RabbitLoader Cache: Optimize your Website for Speed | 22 | 241 | 163 | 2k+ | Output is not escaped | ||
| #242 | RealPress – Real Estate Plugin | 22 | 604 | 1,167 | 500 | Non-prefixed global variable | ||
| #243 | Restrict User Access – Ultimate Membership & Content Protection | 22 | 977 | 1,840 | 10k+ | Non-prefixed global variable | ||
| #244 | Salon Booking System – Free Version | 22 | 655 | 620 | 2k+ | Missing direct file access protection | ||
| #245 | Social Sharing Plugin – Sassy Social Share | 22 | 1,689 | 233 | 100k+ | wp function not compatible with requires wp | ||
| #246 | Sellsy | 22 | 586 | 490 | 400 | Non Singular String Literal Domain | ||
| #247 | Seraphinite Accelerator | 22 | 594 | 255 | 50k+ | Output is not escaped | ||
| #248 | ShortPixel Image Optimizer – Optimize Images, Convert WebP & AVIF | 22 | 1,044 | 800 | 300k+ | Non-prefixed global variable | ||
| #249 | Simple Job Board | 22 | 634 | 1,355 | 10k+ | Non-prefixed global variable | ||
| #250 | Slick Popup: Contact Form 7 Popup Plugin | 22 | 2,322 | 316 | 2k+ | Text Domain Mismatch |