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
#6201List Pages Shortcode96595k+Non-prefixed hook name
#6202Magazine Columns9663600wp function not compatible with requires wp
#6203Cool Integration for LearnPress & WooCommerce96441k+trademarked term
#6204MathJax-LaTeX9615010k+wp function not compatible with requires wp
#6205Menu Cart Divi962691k+Text Domain Mismatch
#6206Metric Converter9643800Missing Version
#6207Modernizr for WordPress9654800Deprecated parameter: load_plugin_textdomain parameter 2
#6208Multicons963802k+wp function not compatible with requires wp
#6209NextGenThemes jsDelivr CDN96270400wp function not compatible with requires wp
#6210NoFollow Link9651500Missing direct file access protection
#6211Ocultar "Añadir al Carrito"9642600Missing direct file access protection
#6212WP Options Importer965646k+Text Domain Mismatch
#6213Divi Masonry Gallery – Pro Gallery9654162k+Text Domain Mismatch
#6214Permalink Trailing Slash Fixer9642700Missing direct file access protection
#6215Plugins Condition963301k+Non-prefixed global variable
#6216Porn Videos Embed961722k+Missing direct file access protection
#6217Preloader Awesome – Page Loading Animation with Spinner & Gif963271k+Missing direct file access protection
#6218Pretty Google Calendar961245k+wp function not compatible with requires wp
#6219Prevent Direct Access – Protect WordPress Files9642610k+Non-prefixed constant
#6220Progress Bar965211k+Text Domain Mismatch
#6221PWA9634320k+Missing direct file access protection
#6222Remove Unrestricted Uploads96531k+Missing direct file access protection
#6223Require Post Category96641k+Discouraged text-domain loading
#6224REST API Meta Support96917k+wp function not compatible with requires wp
#6225RSWPTHEMES ONE CLICK DEMO CONTENT966851k+Missing Arg Domain
#6226RSS Featured Image96422k+Missing direct file access protection
#6227Russian Date by Axelnsk9651500Missing direct file access protection
#6228Selection Sharer by Hans van Gent96642k+wp function not compatible with requires wp
#6229Share on Mastodon962431k+wp function not compatible with requires wp
#6230Show User Registration Date96441k+Non-prefixed function
#6231Smartsupp – live chat, AI shopping assistant and chatbots9616420k+wp function not compatible with requires wp
#6232Tag Cloud Shortcode9651500Missing direct file access protection
#6233Taxonomy List Widget96631k+wp function not compatible with requires wp
#6234Team Members96151620k+Missing direct file access protection
#6235Text Spinner96611k+wp function not compatible with requires wp
#6236Timeline Express – Single Column Add-On9654500Text Domain Mismatch
#6237Title and Nofollow For Links (Classic Editor)9617230k+Missing Arg Domain
#6238Tooltip for Gravity Forms962310900Text Domain Mismatch
#6239Top Level Categories96512k+Missing direct file access protection
#6240Unfiltered MU96523k+Discouraged WordPress constant usage: MUPLUGINDIR
#6241Video User Manuals9615310k+Missing Arg Domain
#6242VK Dynamic If Block96863k+date date
#6243VLibras96625k+Missing direct file access protection
#6244Custom Product tabs for WooCommerce9625610k+wp function not compatible with requires wp
#6245Product Category Showcase for WooCommerce968451k+Non-prefixed global variable
#6246What Template File Am I Viewing?96701k+wp function not compatible with requires wp
#6247Wikipedia Preview968151k+Non-prefixed function
#6248Cart Weight for WooCommerce965121k+Non-prefixed global variable
#6249Dynamic Pricing & Discounts Lite96351400Missing direct file access protection
#6250WooCommerce Product Details Customiser96562k+trademarked term