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
#5851Advanced Posts/Page911623k+Text Domain Mismatch
#5852Astra Bulk Edit914330k+Missing direct file access protection
#5853Block Guide Lines9163900Non-prefixed function
#5854Blockenberg — 600+ Advanced Gutenberg Blocks for WordPress Block Editor9146700block api version too low
#5855Book Review Block911121k+block api version too low
#5856Contact Form 7 Syntax Highlighting914101k+Nonce verification recommended
#5857Contact Form 7 – email body TinyMCE editor9146400Nonce verification recommended
#5858Change Author91801k+Missing Arg Domain
#5859Change Empty Trash Time91531k+Missing direct file access protection
#5860Chatbase91445k+Non-prefixed function
#5861Clever Fox9116130k+wp function not compatible with requires wp
#5862Cliengo – Chatbot91472k+Input is not sanitized
#5863Connector GravityForms and MailerLite91822k+Missing Translators Comment
#5864CryptoCloud – Crypto Payment Gateway91136400Text Domain Mismatch
#5865CTA Button Styler91339400Non-prefixed global variable
#5866Di Blocks – Awesome WordPress Blocks for Gutenberg Editor91731k+Missing direct file access protection
#5867GTM4WP – A Google Tag Manager (GTM) plugin for WordPress915979700k+Non-prefixed global variable
#5868Easy Logo Link Change91611k+Deprecated function: screen_icon
#5869Eazy Login Logo9142400Missing direct file access protection
#5870Elmo9162900Missing direct file access protection
#5871ERE Similar Properties – Essential Real Estate Add-On91431k+Missing direct file access protection
#5872Faust.js91941k+Missing direct file access protection
#5873FT Password Protect Children Pages9181400Missing Arg Domain
#5874Gravity Forms Confirmation Page List9163400Missing direct file access protection
#5875Gravity Forms Placeholder Add-On91541k+trademarked term
#5876Gutentools9117105k+Missing direct file access protection
#5877Helio Pay (Accept 1-click crypto payments #USDC #SOL #BTC #ETH)91811500Missing direct file access protection
#5878Hide Author Archive9163500Missing direct file access protection
#5879Icegram Engage – Popups, Optins, CTAs & Lead Generation91141010k+wp function not compatible with requires wp
#5880Icon List Block – Add Icon-Based Lists with Custom Styles91374k+Not In Footer
#5881Jetpack Lite9137600Non-prefixed function
#5882Lazy Load Elementor Background Images91561k+Non-prefixed function
#5883LegalBlink for Aruba9133298k+Missing direct file access protection
#5884Limit Revisions91711k+Missing Arg Domain
#5885Loop Post Navigation Links9175500Missing Arg Domain
#5886matchHeight91622k+Non-prefixed global variable
#5887MC4WP: WPML Integration91792k+Missing direct file access protection
#5888Meks Quick Plugin Disabler91381k+Nonce verification recommended
#5889Mesmerize Companion91279150k+Non-prefixed global variable
#5890MultiManager WP – Manage All Your WordPress Sites Easily9128111k+Missing Arg Domain
#5891Shipping Live Rates for Royal Mail for WooCommerce91413400Non-prefixed global variable
#5892Pantheon Advanced Page Cache9110610k+Request data is not unslashed
#5893Parent Category Toggler916010k+Missing direct file access protection
#5894PDF Embedder9117300k+Non-prefixed class
#5895PS User Login Count9177400Missing Arg Domain
#5896reBusted!91736k+Missing direct file access protection
#5897Remove Image Links91510800Non-prefixed function
#5898Responsive Tabs915994k+Non Singular String Literal Domain
#5899REST API Toolbox912501k+Missing Arg Domain
#5900Restricted Site Access91141110k+Missing Arg Domain