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
#5901Restricted Site Access91141110k+Missing Arg Domain
#5902SearchWP Modal Search Form91995k+trademarked term
#5903Sensei LMS Post to Course Creator91671k+Missing Translators Comment
#5904Serbian Addons for WooCommerce913413600Text Domain Mismatch
#5905Simple Google Analytics Tracking91621k+Missing direct file access protection
#5906Simple Membership Form Shortcode91712k+Missing direct file access protection
#5907Simply Show IDs91513k+Missing direct file access protection
#5908Slim SEO – A Fast & Automated SEO Plugin For WordPress914970k+Database parameter is not escaped
#5909Slivery Extender91557111k+Text Domain Mismatch
#5910Snow Monkey Forms91364130k+Non-prefixed global variable
#5911Super Light Cache Buster9164700Non-prefixed function
#5912Thememiles Toolset91142500Text Domain Mismatch
#5913WebAuthn Provider for Two Factor916141k+Missing Arg Domain
#5914Unveil Lazy Load91262k+error log error log
#5915Validated9173600Missing direct file access protection
#5916VenoBox Lightbox911141k+Text Domain Mismatch
#5917WCFM – Multivendor Marketplace REST API for WooCommerce915341k+Non-prefixed hook name
#5918WooCommerce New Product Badge9188800Text Domain Mismatch
#5919Bootstrap Blocks9183010k+Non-prefixed global variable
#5920Commerce7 for WordPress912931k+Non-prefixed global variable
#5921WP Mobile Detect91465k+trademarked term
#5922WP Session Manager915162k+Direct Query
#5923WPS HTML Blocks912341k+Text Domain Mismatch
#5924WPSSO Tune WP Image Editors913510900Missing Translators Comment
#5925DearFlip – PDF Flipbook, 3D Flipbook, PDF embed, PDF viewer921011200k+Missing direct file access protection
#5926Ads.txt Manager9244100k+Missing direct file access protection
#5927Table Field Add-on for ACF and SCF929350k+Text Domain Mismatch
#5928Blazeo9245400Missing Version
#5929LB Back To Top9242700Missing Version
#5930Change Text Case92412k+Missing Arg Domain
#5931Contact Form 7 Shortcode Enabler924310k+trademarked term
#5932Control XML-RPC publishing9270400Text Domain Mismatch
#5933Cryptocurrency Widgets – Price Ticker & Coins List924367k+Non-prefixed global variable
#5934Customizer Custom CSS9252400Deprecated parameter: load_plugin_textdomain parameter 2
#5935Display Posts – Easy lists, grids, navigation, and more92112380k+Non-prefixed function
#5936ERE Colors – Essential Real Estate Add-On92411k+Missing direct file access protection
#5937External Permalinks Redux92982k+Non-prefixed hook name
#5938Find And Replace Text9242400Missing direct file access protection
#5939Find Posts Using Attachment92421k+Missing direct file access protection
#5940Force Plugin Updates Check9255500trademarked term
#5941Google Photos embed9225700trademarked term
#5942Grid Shortcodes92322k+Missing Version
#5943IndieAuth923127400Missing direct file access protection
#5944Lightweight Grid Columns924210k+Missing Version
#5945LitCommerce: Multi-channel Selling Tool For WooCommerce92432k+Missing direct file access protection
#5946OTP Login With Phone Number, OTP Verification92323900Non-prefixed hook name
#5947Block for Apple Maps921431k+Missing direct file access protection
#5948MB ImageChimp RSS Feed Enhancer9260700wp function not compatible with requires wp
#5949Yoga Schedule Momoyoga92321k+Missing Version
#5950Nelio A/B Testing – AB Tests and Heatmaps for Better Conversion Optimization92182905k+Non-prefixed hook name