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
#5501Template Kit – Export837908k+Non-prefixed global variable
#5502Term Duplicator8356500Input is not sanitized
#5503Unlist Posts & Pages835910k+Nonce verification recommended
#5504SKU Label Changer For WooCommerce83811700Missing direct file access protection
#5505Stickers for WooCommerce83952143k+wp function not compatible with requires wp
#5506WP BASIC Auth834134k+Input is not sanitized
#5507Image Gallery Block – Photo Gallery, Masonry & Lightbox849222k+Non-prefixed global variable
#5508Acme Demo Setup848610k+Non-prefixed function
#5509Campo RUT para CF78467600Missing nonce verification
#5510Add Descendants As Submenu Items84382k+Missing nonce verification
#5511Aimogen – AI Content Writer, Chatbot, Editor and AI Automation for WordPress841234400Not In Footer
#5512AnimateGL Animations for WordPress – Elementor & Gutenberg Blocks Animations8488203k+Text Domain Mismatch
#5513Dynific Addons for Elementor (formerly AnyWhere Elementor)8433570k+Text Domain Mismatch
#5514Append extensions on Pages8473800Missing direct file access protection
#5515Astra Theme Visual Hooks845452k+Text Domain Mismatch
#5516Change Admin Email844450k+Missing nonce verification
#5517ClickShip841351k+Output is not escaped
#5518Crazy Egg841217k+wp function not compatible with requires wp
#5519WP All Import – Import Add-On for ACF8434650k+Non-prefixed global variable
#5520Digital Signature For Contact Form 78422115k+file system operations fwrite
#5521Enable Turnstile (Cloudflare) for Gravity Forms8487700Missing direct file access protection
#5522Events Calendar for Google841382k+Missing direct file access protection
#5523Filterable Portfolio843761k+Non-prefixed global variable
#5524FlippingBook841462k+Missing Translators Comment
#5525Floating Button – Easily Create Sticky, Fixed & Floating Buttons8461844k+Non-prefixed global variable
#5526Floating Publish Button84541k+Unsafe printing function
#5527Genesis Simple Hooks8414120k+Output is not escaped
#5528Get the Image84887k+Non-prefixed hook name
#5529Stape Conversion Tracking8423410k+Non Singular String Literal Domain
#5530Lightweight Cookie Notice – Cookie Banner for Cookie Consent848185k+Database parameter is not escaped
#5531Mailster reCaptcha844151k+Missing nonce verification
#5532Nav Menu Roles8431870k+Non-prefixed hook name
#5533Ocean Social Sharing84103660k+Non-prefixed global variable
#5534Public Post Preview Configurator8414610k+Non Singular String Literal Domain
#5535Replace Image845138k+Input is not sanitized
#5536Search by ID8435700Input is not sanitized
#5537SearchIQ – The Search Solution847181k+Database parameter is not escaped
#5538Simple Testimonials Showcase843311500Missing Translators Comment
#5539SlickNav Mobile Menu841303k+Output is not escaped
#5540Ultra Addons Lite for Elementor843018700wp function not compatible with requires wp
#5541UTMs Carry Pages84411400Non-prefixed global variable
#5542Web Stories84126360k+Non-prefixed global variable
#5543Easy Duplicate Product for WooCommerce84783k+Missing direct file access protection
#5544WP PDF Generator8421221k+Request data is not unslashed
#5545wpautop control84751k+trademarked term
#5546WPB Accordion Menu – Collapsible Vertical Sidebar Menu – WooCommerce Category Accordion8455910k+Non-prefixed hook name
#5547WPLANG Lite8485400trademarked term
#5548WPML Shortcodes84712900Non-prefixed function
#5549Wrap form fields in Gravity Forms842231k+Text Domain Mismatch
#5550Advanced Post Manager8511184k+Request data is not unslashed