missing_direct_file_access_protection

Missing direct file access protection

A PHP file in the plugin can be loaded directly instead of through WordPress.

medium weight

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.

Affected Plugins

RankPluginScoreErrorsWarningsInstallsAddedUpdatedTop Issue
#4501iubenda | All-in-one Compliance for GDPR / CCPA Cookie Consent + more60405271200k+Text Domain Mismatch
#4502Just Responsive Images60257500Missing direct file access protection
#4503Kubio AI Page Builder602837780k+Missing direct file access protection
#4504Mailster AmazonSES Integration6052251k+Missing Arg Domain
#4505Material Design for WordPress6051207800Non-prefixed global variable
#4506Product Labels, Quick View, Buy Now, Pre-Orders, Frequently Bought Together & More for WooCommerce – Merchant60117409k+Non-prefixed global variable
#4507Order Export & Order Import for WooCommerce6024769860k+Non-prefixed global variable
#4508Post Duplicator603324200k+Missing direct file access protection
#4509Real Accessability602191k+Output is not escaped
#4510RealHomes PayPal Payments605523400Non Singular String Literal Domain
#4511Responsive videos – Fitvids60263700Output is not escaped
#4512Simple Owl Carousel602313500Missing Translators Comment
#4513Stratum Widgets for Elementor606636620k+Non-prefixed global variable
#4514Surge6046474k+Non-prefixed global variable
#4515Team – Team Members Showcase Plugin601278110k+Non-prefixed global variable
#4516WP Blog Post Layouts603624910k+Non-prefixed global variable
#4517WP Bottom Menu60745220k+Non-prefixed hook name
#4518WP-SWFObject6014241k+Deprecated parameter: add_option parameter 3
#4519WPSSO Schema Product Metadata for WooCommerce603323500Missing Translators Comment
#4520Academy LMS61185212k+Non-prefixed global variable
#4521Accessibility Font Resizer61541800Text Domain Mismatch
#4522Add Quantity Field on Shop Page for WooCommerce61337700Output is not escaped
#4523Ads.txt Manager6133164k+Text Domain Mismatch
#4524In-Post Ads612710600Text Domain Mismatch
#4525Alerts for Beaver Builder61421500Output is not escaped
#4526CommerceBird – AI Command Center, ERP Integrations & B2B for WooCommerce (Zoho, Exact Online).612162400Direct Query
#4527Compact WP Audio Player61122120k+Non-prefixed function
#4528Constructor for SiteOrigin61296600Output is not escaped
#4529Creative Commons6110317700Text Domain Mismatch
#4530Documents for WooCommerce611613500Output is not escaped
#4531ELEX WooCommerce Catalog Mode61974910k+Text Domain Mismatch
#4532GamiPress – Link61325800Output is not escaped
#4533Country and State Selection Addon for Gravity Forms6114261k+Non-prefixed constant
#4534Hide Admin Bar For User Roles613810500Output is not escaped
#4535jQuery Lightbox612231k+Output is not escaped
#4536Magic Tooltips For Contact Form 7613721700Text Domain Mismatch
#4537Marker.io – Visual Website Feedback616314k+Request data is not unslashed
#4538Media Library Helper — Bulk edit image ALT, caption & description61167010k+Non-prefixed global variable
#4539Mentions Legales Par Webdeclic618239500Non Singular String Literal Domain
#4540Newspack Newsletters6153471k+Request data is not unslashed
#4541Order On Mobile for WooCommerce6137152k+Text Domain Mismatch
#4542Organic Custom Content61818700Input is not sanitized
#4543Post/Page Import Export – Migrate Content with Custom Fields & Taxonomies611227400Input is not sanitized
#4544Powerkit – Supercharge your WordPress Site616711610k+Non-prefixed global variable
#4545Publish Post Email Notification611618600Output is not escaped
#4546Qikink Print On Demand and DropShipping6114231k+Input is not validated
#4547Remove Featured Image6121121k+Missing Arg Domain
#4548SHK Hide Title611943k+Output is not escaped
#4549Slide everything for Elementor619316k+Text Domain Mismatch
#4550HuCommerce | Magyar kiegészítések WooCommerce webáruházakhoz611719410k+Non-prefixed function