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
#101Wise Chat214705065k+Output is not escaped
#102Paysera Payment Gateway for WooCommerce211,8661957k+Exception output is not escaped
#103Booster for WooCommerce – PDF Invoices, Abandoned Cart, Variation Swatches & 100+ Tools217863,39530k+Non-prefixed global variable
#104Pay For Post with WooCommerce219601,4741k+Non-prefixed global variable
#105PPOM – Product Addons & Custom Fields for WooCommerce213361,32520k+Non-prefixed global variable
#106Wordfence Security – Firewall, Malware Scan, and Login Security211,5922,9735m+Output is not escaped
#107WP-Lister Lite for eBay216,6975,1292k+Output is not escaped
#108WP phpMyAdmin214,5286,43550k+Missing Arg Domain
#109wpDataTables – WordPress Data Table, Dynamic Tables & Table Charts Plugin211,8141,46170k+Output is not escaped
#110Premium Packages – Sell Digital Products Securely212,7652,4443k+Output is not escaped
#111WPScan – WordPress Security Scanner215272658k+Text Domain Mismatch
#112Frontend Admin by DynamiApps225,9223,20810k+Text Domain Mismatch
#113Advanced Ads – Ad Manager & AdSense22578734100k+Non-prefixed global variable
#114Advanced Classifieds & Directory Pro221,2293,5112k+Non-prefixed global variable
#115Advanced Form Integration — Connect Forms to 200+ Apps225,7714,67810k+wp function not compatible with requires wp
#116Ajax Load More – Infinite Scroll, Load More, & Lazy Load2264159540k+Unsafe printing function
#117All-in-One Video Gallery229112,89220k+Non-prefixed global variable
#118Booking for Appointments and Events Calendar – Amelia221,48948090k+Exception output is not escaped
#119Shortcodes and extra features for Phlox theme2241342690k+Output is not escaped
#120Knowledge Base documentation & wiki plugin – BasePress Docs226711,7672k+Non-prefixed global variable
#121Borderless – Addons and Templates for Elementor224381,3885k+Non-prefixed global variable
#122Better Messages – Chat Rooms, Group Chat, Private Messages & AI Chat Bots221,6042,01910k+Direct Query
#123BuddyPress225839,008100k+Non-prefixed function
#124Better WordPress Minify224124848k+Non Singular String Literal Domain
#125Captcha by BestWebSoft – Advanced Spam Protection, Math & OCR-Friendly Captcha for Site Forms2249329510k+Text Domain Mismatch
#126Divi Carousel Lite – 17+ Carousel Module229671,27510k+Non-prefixed global variable
#127Cleanup Action Scheduler225451,3061k+Non-prefixed global variable
#128Clearfy Cache – WordPress optimization plugin, Minify HTML, CSS & JS, Defer222,8581,27050k+Text Domain Mismatch
#129Code Profiler – WordPress Performance Profiling and Debugging Made Easy222654008k+Non-prefixed global variable
#130Passster – Password Protect Pages and Content225391,41910k+Non-prefixed global variable
#131Cozy Blocks – Page Builder for Gutenberg Editor & FSE with 500+ Patterns, 57 Blocks & Templates222,1674,1757k+Non-prefixed global variable
#132RegistrationMagic – Custom Registration Forms, User Registration, Payment, and User Login223,6545,0618k+Non-prefixed global variable
#133WP Customer Area223,30894110k+Text Domain Mismatch
#134SysBasics Customize My Account for WooCommerce – Dashboard, Endpoints, Avatar & Menu Manager227058458k+Non-prefixed global variable
#135Data Tables Generator by Supsystic2215614410k+Exception output is not escaped
#136Directorist: AI-Powered Business Directory, Listings & Classified Ads224432,12920k+Non-prefixed global variable
#137Download Manager222,2901,301100k+Output is not escaped
#138Dynamic QR Code – generator222382086k+Missing direct file access protection
#139E2Pdf – Export Pdf Tool for WordPress221,07583610k+Unsafe printing function
#140Easy Social Feed – Social Photos Gallery and Post Feed for WordPress221,5671,27730k+Non-prefixed global variable
#141EleSpare – News, Magazine and Blog Addons for Elementor227331,42310k+Non-prefixed global variable
#142Estatik Real Estate Plugin223,04932510k+Text Domain Mismatch
#143Events Manager – Calendar, Bookings, Tickets, and more!224,7225,62170k+Output is not escaped
#144Falang multilanguage for WordPress227167691k+Output is not escaped
#145File Manager Pro – Filester22565391100k+Request data is not unslashed
#146Finale Lite – Sales Countdown Timer & Discount for WooCommerce221,0314514k+Output is not escaped
#147FireBox Popups – Increase Sales and Grow Your Email List221538127k+Non-prefixed global variable
#148Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder22409236700k+Text Domain Mismatch
#149Notification Bar, Announcement and Cookie Notice WordPress Plugin – FooBar221,3211,3713k+Non-prefixed global variable
#150Five Star Restaurant Menu and Food Ordering227526095k+Output is not escaped