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
#6301AOS Animation for SiteOrigin Page Builder97273k+Missing Version
#6302Markdown Editor (Formerly Dark Mode)972191k+Non-prefixed function
#6303Date Time Picker for Contact Form 7978220k+Text Domain Mismatch
#6304Design Upgrade for LearnDash97517k+Missing direct file access protection
#6305Device Mockups9773900Missing direct file access protection
#6306Disable auto-update Email Notifications973230k+Missing direct file access protection
#6307Disable New User Notification Emails97264k+Non-prefixed hook name
#6308Disable Password Reset97501k+Forbidden PHP function found
#6309Disable Responsive Images9750600Forbidden PHP function found
#6310Disable Right Click and Content Copy Protection9742400Missing Version
#6311Disable URL Autocorrect Guessing97501k+Missing direct file access protection
#6312Disable WP Revisions9744400trademarked term
#6313Disable Yoast's Structured Data9743900trademarked term
#6314Display All Image Sizes97341k+Missing Version
#6315DocsPress – Online Documentation97163400wp function not compatible with requires wp
#6316Double the Donation – A workplace giving tool97641k+Missing Version
#6317Easy Custom Sidebars978110k+Missing direct file access protection
#6318Easy Widget Columns97317400Non-prefixed global variable
#6319Eazy XMLRPC Pingback Disable9741800Missing direct file access protection
#6320Editor Full Width Gutenberg97344k+trademarked term
#6321Embed Google Photos album97523k+Missing direct file access protection
#6322Empty P Tag9741800Missing direct file access protection
#6323ESV CrossReference Tool9741500Missing direct file access protection
#6324Excerpts for Pages9742500Missing direct file access protection
#6325Exif Caption97325600Non-prefixed global variable
#6326Fake Pay For WooCommerce971311k+Text Domain Mismatch
#6327FancyBox Gallery9745400Missing Version
#6328FAQ Block9742500Discouraged text-domain loading
#6329Featured Image Zoom9741900Missing direct file access protection
#6330Flexible Cookies975393k+Non-prefixed global variable
#6331Flip Cards Module For Divi9713613k+Text Domain Mismatch
#6332JavaScript to Footer9750500Missing direct file access protection
#6333Force Default Variant for WooCommerce97703k+Missing direct file access protection
#6334Force Update Translations97811k+Missing direct file access protection
#6335Front Page Category97425k+Missing direct file access protection
#6336Gallery in columns9735500Missing Version
#6337Genesis Portfolio Pro979165k+Non-prefixed global variable
#6338Geo Redirect971011k+Missing direct file access protection
#6339Geo to Lat97311500Direct Query
#6340GutenBee – Gutenberg Blocks977107k+Missing direct file access protection
#6341Reviewkit – Trustpilot Reviews Widget & Embed97328700Non-prefixed global variable
#6342Hide All Notices97412k+Missing Version
#6343Hide Content by User Role for WPBakery97551k+Missing direct file access protection
#6344Hierarchical HTML Sitemap97354k+Post Not In exclude
#6345html after URL97324k+Missing direct file access protection
#6346HTTP/2 Server Push9741900Missing direct file access protection
#6347Video Gallery by Huzzaz9752900Non Enqueued Script
#6348iframe Wrapper9733500Missing Version
#6349Image Automatic Height Width9760400Missing direct file access protection
#6350Img Title Removal97321k+Missing direct file access protection