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 |
|---|---|---|---|---|---|---|---|---|
| #4501 | iubenda | All-in-one Compliance for GDPR / CCPA Cookie Consent + more | 60 | 405 | 271 | 200k+ | Text Domain Mismatch | ||
| #4502 | Just Responsive Images | 60 | 25 | 7 | 500 | Missing direct file access protection | ||
| #4503 | Kubio AI Page Builder | 60 | 283 | 77 | 80k+ | Missing direct file access protection | ||
| #4504 | Mailster AmazonSES Integration | 60 | 52 | 25 | 1k+ | Missing Arg Domain | ||
| #4505 | Material Design for WordPress | 60 | 51 | 207 | 800 | Non-prefixed global variable | ||
| #4506 | Product Labels, Quick View, Buy Now, Pre-Orders, Frequently Bought Together & More for WooCommerce – Merchant | 60 | 11 | 740 | 9k+ | Non-prefixed global variable | ||
| #4507 | Order Export & Order Import for WooCommerce | 60 | 247 | 698 | 60k+ | Non-prefixed global variable | ||
| #4508 | Post Duplicator | 60 | 33 | 24 | 200k+ | Missing direct file access protection | ||
| #4509 | Real Accessability | 60 | 21 | 9 | 1k+ | Output is not escaped | ||
| #4510 | RealHomes PayPal Payments | 60 | 55 | 23 | 400 | Non Singular String Literal Domain | ||
| #4511 | Responsive videos – Fitvids | 60 | 26 | 3 | 700 | Output is not escaped | ||
| #4512 | Simple Owl Carousel | 60 | 23 | 13 | 500 | Missing Translators Comment | ||
| #4513 | Stratum Widgets for Elementor | 60 | 66 | 366 | 20k+ | Non-prefixed global variable | ||
| #4514 | Surge | 60 | 46 | 47 | 4k+ | Non-prefixed global variable | ||
| #4515 | Team – Team Members Showcase Plugin | 60 | 12 | 781 | 10k+ | Non-prefixed global variable | ||
| #4516 | WP Blog Post Layouts | 60 | 36 | 249 | 10k+ | Non-prefixed global variable | ||
| #4517 | WP Bottom Menu | 60 | 74 | 52 | 20k+ | Non-prefixed hook name | ||
| #4518 | WP-SWFObject | 60 | 14 | 24 | 1k+ | Deprecated parameter: add_option parameter 3 | ||
| #4519 | WPSSO Schema Product Metadata for WooCommerce | 60 | 33 | 23 | 500 | Missing Translators Comment | ||
| #4520 | Academy LMS | 61 | 18 | 521 | 2k+ | Non-prefixed global variable | ||
| #4521 | Accessibility Font Resizer | 61 | 54 | 1 | 800 | Text Domain Mismatch | ||
| #4522 | Add Quantity Field on Shop Page for WooCommerce | 61 | 33 | 7 | 700 | Output is not escaped | ||
| #4523 | Ads.txt Manager | 61 | 33 | 16 | 4k+ | Text Domain Mismatch | ||
| #4524 | In-Post Ads | 61 | 27 | 10 | 600 | Text Domain Mismatch | ||
| #4525 | Alerts for Beaver Builder | 61 | 42 | 1 | 500 | Output is not escaped | ||
| #4526 | CommerceBird – AI Command Center, ERP Integrations & B2B for WooCommerce (Zoho, Exact Online). | 61 | 2 | 162 | 400 | Direct Query | ||
| #4527 | Compact WP Audio Player | 61 | 12 | 21 | 20k+ | Non-prefixed function | ||
| #4528 | Constructor for SiteOrigin | 61 | 29 | 6 | 600 | Output is not escaped | ||
| #4529 | Creative Commons | 61 | 103 | 17 | 700 | Text Domain Mismatch | ||
| #4530 | Documents for WooCommerce | 61 | 16 | 13 | 500 | Output is not escaped | ||
| #4531 | ELEX WooCommerce Catalog Mode | 61 | 97 | 49 | 10k+ | Text Domain Mismatch | ||
| #4532 | GamiPress – Link | 61 | 32 | 5 | 800 | Output is not escaped | ||
| #4533 | Country and State Selection Addon for Gravity Forms | 61 | 14 | 26 | 1k+ | Non-prefixed constant | ||
| #4534 | Hide Admin Bar For User Roles | 61 | 38 | 10 | 500 | Output is not escaped | ||
| #4535 | jQuery Lightbox | 61 | 22 | 3 | 1k+ | Output is not escaped | ||
| #4536 | Magic Tooltips For Contact Form 7 | 61 | 37 | 21 | 700 | Text Domain Mismatch | ||
| #4537 | Marker.io – Visual Website Feedback | 61 | 6 | 31 | 4k+ | Request data is not unslashed | ||
| #4538 | Media Library Helper — Bulk edit image ALT, caption & description | 61 | 16 | 70 | 10k+ | Non-prefixed global variable | ||
| #4539 | Mentions Legales Par Webdeclic | 61 | 82 | 39 | 500 | Non Singular String Literal Domain | ||
| #4540 | Newspack Newsletters | 61 | 53 | 47 | 1k+ | Request data is not unslashed | ||
| #4541 | Order On Mobile for WooCommerce | 61 | 37 | 15 | 2k+ | Text Domain Mismatch | ||
| #4542 | Organic Custom Content | 61 | 8 | 18 | 700 | Input is not sanitized | ||
| #4543 | Post/Page Import Export – Migrate Content with Custom Fields & Taxonomies | 61 | 12 | 27 | 400 | Input is not sanitized | ||
| #4544 | Powerkit – Supercharge your WordPress Site | 61 | 67 | 116 | 10k+ | Non-prefixed global variable | ||
| #4545 | Publish Post Email Notification | 61 | 16 | 18 | 600 | Output is not escaped | ||
| #4546 | Qikink Print On Demand and DropShipping | 61 | 14 | 23 | 1k+ | Input is not validated | ||
| #4547 | Remove Featured Image | 61 | 21 | 12 | 1k+ | Missing Arg Domain | ||
| #4548 | SHK Hide Title | 61 | 19 | 4 | 3k+ | Output is not escaped | ||
| #4549 | Slide everything for Elementor | 61 | 93 | 1 | 6k+ | Text Domain Mismatch | ||
| #4550 | HuCommerce | Magyar kiegészítések WooCommerce webáruházakhoz | 61 | 17 | 194 | 10k+ | Non-prefixed function |