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
#2601Doneren met Mollie364203514k+SQL query is not prepared
#2602Drag and Drop Multiple File Upload for Contact Form 736823660k+wp function not compatible with requires wp
#2603Duplicate Post – duplicate pages, copy content, clone posts3676815k+wp function not compatible with requires wp
#2604Dynamic Copyright Year3697243800Output is not escaped
#2605Dynamic Front-End Heartbeat Control362171111k+Text Domain Mismatch
#2606Dynamic Visibility for Elementor36568950k+Non-prefixed hook name
#2607Easy Support Videos – Embed videos in the admin3616095500Output is not escaped
#2608Product Carousel Slider for Elementor36148631k+Text Domain Mismatch
#2609Email Before Download3689296k+Unsafe printing function
#2610Endora3653721k+Output is not escaped
#2611Enormail Sign Up Forms36133126400Output is not escaped
#2612Envo's Templates & Widgets for Elementor and WooCommerce361,0655410k+Text Domain Mismatch
#2613Events Manager and WPML Compatibility361011771k+Direct Query
#2614Export Variable Products367949400Text Domain Mismatch
#2615Happy WooCommerce FAQs – Ultimate Product FAQ Plugin36651191k+Nonce verification recommended
#2616FreePay for WooCommerce36114102400Output is not escaped
#2617Genesis Sandbox Featured Content Widget36229241k+Text Domain Mismatch
#2618GetPaid > Wallet36149174700Text Domain Mismatch
#2619Google SEO Pressor for Rich snippets3651160400Missing nonce verification
#2620Google Webfont Optimizer364549700Output is not escaped
#2621Gutena Kit – Gutenberg Blocks and Templates3639871k+Nonce verification recommended
#2622Header Footer Script Adder – Insert Code in Header, Body & Footer36203781k+Text Domain Mismatch
#2623Header Footer Code Manager3681180600k+Non-prefixed global variable
#2624HTML Forms – Simple WordPress Forms Plugin3623116610k+Output is not escaped
#2625HTML5 Maps361941605k+Output is not escaped
#2626HTTP Requests Manager3698901k+Output is not escaped
#2627Page Speed Optimizer: HTTP/2 Push, Async JavaScript, and Defer CSS3668336k+Output is not escaped
#2628If-So Geolocation3650571k+Non-prefixed global variable
#2629Insert Headers and Footers Code – HT Script36391347k+Text Domain Mismatch
#2630Italy Cookie Choices (for EU Cookie Law & Cookie Notice)361157710k+Unsafe printing function
#2631Just TinyMCE Custom Styles36112281k+Missing Arg Domain
#2632Leartes TRY Exchange Rates3625027500Text Domain Mismatch
#2633Legal Text Connector of the IT-Recht Kanzlei36454610k+Exception output is not escaped
#2634Libro de Reclamaciones y Quejas362661244k+Text Domain Mismatch
#2635Linkable Title Html and Php Widget3610831600Output is not escaped
#2636Login as User361016430k+Output is not escaped
#2637LONG URL MAKER3639711k+Direct Query
#2638LocalWeb All In One36342975k+Non-prefixed global variable
#2639MailMunch – Grow your Email List36102496k+Output is not escaped
#2640Manage Notification E-mails3612998100k+Non-prefixed function
#2641Materialis Companion36129676k+Unsafe printing function
#2642Media Deduper3660999k+Missing Arg Domain
#2643Microsoft Clarity3648163200k+Nonce verification recommended
#2644Mobile Menu Builder for WordPress368133600Output is not escaped
#2645Motors VIN Decoder368788400Output is not escaped
#2646코드엠샵 마이사이트 – MSHOP MY SITE365855800Output is not escaped
#2647Multiple Sidebars3610975600Non Singular String Literal Domain
#2648WP Sticky Sidebar – Floating Sidebar On Scroll for Any Theme36938410k+Non-prefixed global variable
#2649News Ticker for Elementor3676572k+Text Domain Mismatch
#2650NextGEN Custom Fields362151311k+SQL query is not prepared