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
#6701Accessibility Tool Kit: WP Accessibility checker plugin for WCAG, Section 508, ADA, EAA Compliance99141k+trademarked term
#6702Add From Server Reloaded99213k+Missing direct file access protection
#6703AntiVirus992130k+Missing direct file access protection
#6704Audio Album99214k+Discouraged text-domain loading
#6705Auto Block Recovery9911600Missing direct file access protection
#6706Auto Hide Admin Bar99204k+Missing direct file access protection
#6707Enhanced Responsive Images991250k+Missing direct file access protection
#6708BEA – Sanitize Filename99201k+Missing direct file access protection
#6709Better Aria Label Support99305k+Missing direct file access protection
#6710Bring Back the Get Shortlink Button99201k+Missing direct file access protection
#6711CBX Map for Google Map & OpenStreetMap9920900Missing direct file access protection
#6712SMTP for Contact Form 799501k+Missing direct file access protection
#6713Classic Menus for Block Themes9920500Missing direct file access protection
#6714Columns99213k+Missing Version
#6715Pay With MetaMask For WooCommerce – Cryptocurrency Payment Gateway9934600Missing direct file access protection
#6716CSS Class Manager – An advanced autocomplete additional css class control for your blocks9912400Discouraged text-domain loading
#6717Default Featured Image992260k+Missing direct file access protection
#6718Disable Embeds992010k+Missing direct file access protection
#6719Disable Login Language Switcher99201k+Missing direct file access protection
#6720Display Featured Image In Post List99203k+Missing direct file access protection
#6721Email Address Obfuscation99302k+wp function not compatible with requires wp
#6722CanadaHelps Embedded Donation Form9920400Missing direct file access protection
#6723Event Single Page Builder For The Events Calendar99126k+Non-prefixed class
#6724Button Plus for Elementor99211k+Missing direct file access protection
#6725Featured Image99201k+Missing direct file access protection
#6726Filter for Divi99202k+Missing direct file access protection
#6727Generate Security.txt9915400Non-prefixed class
#6728Image Title Remove99201k+Missing direct file access protection
#6729Inline Spoilers99211k+Missing direct file access protection
#6730Insert Special Characters99303k+Missing direct file access protection
#6731jAlbum Bridge9916500Not In Footer
#6732Kitstarter9920400Missing direct file access protection
#6733Language Fallback99215k+Missing direct file access protection
#6734Light Modal Block99112k+Missing direct file access protection
#6735Link Shortner9920700Missing direct file access protection
#6736MakeITeasy Popup99301k+Missing direct file access protection
#6737Marquee Block99201k+Missing direct file access protection
#6738Masks Form Fields99209k+Missing direct file access protection
#6739Nelio Popups9950900Missing direct file access protection
#6740NEX-Forms ADD ON – Form Themes99201k+Missing direct file access protection
#6741NodeInfo(2)9911900Missing direct file access protection
#6742Ogp Plus9916600Non-prefixed global variable
#6743Validate Audio Attribution9920900Missing direct file access protection
#6744Post Type Transfer99443k+Missing direct file access protection
#6745Printify for WooCommerce992310k+Missing direct file access protection
#6746Product categories search admin for woocommerce9931400Missing direct file access protection
#6747Protect Uploads992130k+Missing direct file access protection
#6748PVB Contact Form 7 Calculator9943600Missing direct file access protection
#6749Remove Admin Bar logo99201k+Missing direct file access protection
#6750Remove Protected In Title99201k+Missing direct file access protection