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
#2401Ray3532500Hidden files included
#2402Spectra Blocks – AI Website Builder for the Block Editor352411,2768k+Non-prefixed global variable
#2403Spots3519549800Output is not escaped
#2404Spreadshop Plugin35145444k+wp function not compatible with requires wp
#2405Square Thumbnails3543317800error log error log
#2406SrbTransLatin – Serbian Latinisation3511282k+Non-prefixed global variable
#2407SSL Insecure Content Fixer352860100k+Input is not sanitized
#2408Steady for WordPress35613600Non-prefixed global variable
#2409Sticky Chat Widget – Floating Chat Icons, Contact Form, Call, Click to Chat, Email & Message Buttons353329310k+Non-prefixed global variable
#2410String locator3552319100k+Non-prefixed global variable
#2411Subscribe to Unlock Lite – Opt In Content Locker Plugin for WordPress35106145500Non-prefixed global variable
#2412Super Cool Ad Inserter Plugin35225600Text Domain Mismatch
#2413SweepPress: Website Cleanup and Optimization3571176500Non-prefixed global variable
#2414Table for Divi35522k+Hidden files included
#2415TailPress – Tailwind for WordPress352322500Output is not escaped
#2416Tapfiliate353549400Nonce verification recommended
#2417TBThemes Theme Import358448400Text Domain Mismatch
#2418TC Custom JavaScript35192610k+Missing Version
#2419Teamleader CRM Forms3515030500Non Singular String Literal Domain
#2420Starter Sites & Templates by Neve352888100k+Non-prefixed hook name
#2421Termageddon: Cookie Consent & Privacy Compliance3527137k+Exception output is not escaped
#2422Advance Product Search- Voice & Ajax Search for WooCommerce351259210k+Text Domain Mismatch
#2423The Social Links3516292k+Non-prefixed global variable
#2424Theme Blvd Layout Builder352071692k+Output is not escaped
#2425ThemeRain Core3569611k+Text Domain Mismatch
#2426Themify Audio Dock35229900Non-prefixed global variable
#2427Themify Icons3533123k+Output is not escaped
#2428Themify Shortcodes3536167k+Output is not escaped
#2429Thumbnail Editor3518768600wp function not compatible with requires wp
#2430TikTok353122200k+Missing Arg Domain
#2431TinyMCE Templates35412720k+Text Domain Mismatch
#2432Transcoder3542111400Non-prefixed function
#2433TS Webfonts for さくらのレンタルサーバ3518310030k+Missing Arg Domain
#2434Two Factor Authentication3510813920k+Output is not escaped
#2435uCalc35788600Text Domain Mismatch
#2436Ultimate Post List35186842k+Missing Arg Domain
#2437Unagi3592900Missing direct file access protection
#2438Under Construction3530600k+Hidden files included
#2439Use Google Libraries3513510k+Hidden files included
#2440User Photo35112683k+Output is not escaped
#2441Vendi Abandoned Plugin Check351331k+trademarked term
#2442Embed videos and respect privacy356112k+Non-prefixed global variable
#2443Video Grid352531061k+Output is not escaped
#2444Void Elementor Post Grid Addon for Elementor Page builder35189933k+Text Domain Mismatch
#2445Voyapp Chile – Lugares y Cotizador de Despachos3522584400Output is not escaped
#2446W4 Post List35501383k+Non-prefixed global variable
#2447Walls.io: Social Media Feed351071k+Hidden files included
#2448WATI Chat and Notification3590600Missing direct file access protection
#2449Wavy Divider35101700Hidden files included
#2450WC Cancel Order35521225k+Non-prefixed hook name