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
#6401Show Current Template9741100k+Discouraged text-domain loading
#6402Show Menu Shortcode9750400Missing direct file access protection
#6403Show User ID9743800Non-prefixed function
#6404ShowID for Post/Page/Category/Tag/Comment97518k+Missing direct file access protection
#6405Simple Analytics97631k+Missing Translators Comment
#6406Simple Blog Card976183k+Non-prefixed global variable
#6407Simple GDPR Cookie Compliance9710166k+Non-prefixed global variable
#6408Simple Iframe97506k+Missing direct file access protection
#6409Simple Content Templates for Blog Posts & Pages97581k+Direct Query
#6410Simple SMTP973102k+Non-prefixed hook name
#6411Simple Social Icons9743100k+Missing direct file access protection
#6412Sirvoy Booking Engine97411k+Missing direct file access protection
#6413Image and video gallery from Google Drive971514k+Missing direct file access protection
#6414Slideshow97421k+Post Not In exclude
#6415Slimbox9741600Missing direct file access protection
#6416Sopro9744500Non-prefixed function
#6417SP RTL (RusToLat)97502k+Missing direct file access protection
#6418Speed up Contact Form 797110400wp function not compatible with requires wp
#6419Sticky Menu & Sticky Header97423100k+Non-prefixed global variable
#6420StylizedX – Variation Switcher Dark Mode for Full Site Editing (FSE) Themes97422k+block api version too low
#6421Super Emoji Plus+97321k+Missing direct file access protection
#6422Superb Helper975328k+Non-prefixed global variable
#6423SVGator971501k+Missing direct file access protection
#6424Syncee Premium Dropshipping & Wholesale975031k+Text Domain Mismatch
#6425Tabs Block9738400Missing Version
#6426Taxonomy Dropdown Widget97622k+wp function not compatible with requires wp
#6427Themes Artist Demo Importer977561k+Text Domain Mismatch
#6428TinyMCE Clear Float972410k+Missing direct file access protection
#6429TinyMCE Smiley Button9733600Missing Version
#6430Tutor LMS BunnyNet Integration972131k+Non-prefixed global variable
#6431Twentig Supercharged Block Editor – Blocks, Patterns, Starter Sites, Portfolio97127020k+Text Domain Mismatch
#6432Adobe Fonts (formerly Typekit) for WordPress973510k+trademarked term
#6433Unique Headers9712610k+Missing Translators Comment
#6434URL ShortCodes97412k+Missing direct file access protection
#6435User Shortcodes974131k+Non-prefixed global variable
#6436Watermark RELOADED9763700Non-prefixed constant
#6437Change Currency Symbol for WooCommerce9761600Text Domain Mismatch
#6438Responsive Videos by Angie Makes9752600Missing direct file access protection
#6439WebConnex Form Management97313500Missing Version
#6440What Template97601k+Missing Arg Domain
#6441WN Elementor Glassy Columns971121k+Text Domain Mismatch
#6442Custom Fee Woocommerce97243400Text Domain Mismatch
#6443Woobox97531k+trademarked term
#6444WooCommerce Product Image Flipper97353k+trademarked term
#6445WP Author, Date and Meta Remover974310k+trademarked term
#6446Bloginfo Shortcode9741700Missing direct file access protection
#6447WP Favicon Remover973410k+trademarked term
#6448WP Fluid Images9743400trademarked term
#6449Contact Listing for WP Job Manager97556k+trademarked term
#6450LightPress Lightbox9733440k+Text Domain Mismatch