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
#151wpDataTables – WordPress Data Table, Dynamic Tables & Table Charts Plugin211,8111,43270k+Output is not escaped
#152WP Extended – The Ultimate WordPress Toolkit211,253398600Non Singular String Literal Domain
#153WPScan – WordPress Security Scanner215272658k+Text Domain Mismatch
#154WebTotem Security211,110213900Text Domain Mismatch
#15512 Step Meeting List22156593900Non-prefixed global variable
#156WP Sessions Time Monitoring Full Automatic228691,529500Non-prefixed global variable
#157Advanced Classifieds & Directory Pro221,2293,5112k+Non-prefixed global variable
#158Ajax Load More – Infinite Scroll, Load More, & Lazy Load2264159540k+Unsafe printing function
#159All-in-One Video Gallery229112,89220k+Non-prefixed global variable
#160Author Website Templates – Create Writer, Author & Publisher Websites Easily227112,910500Non-prefixed global variable
#161ANAC XML Bandi di Gara22294244600Output is not escaped
#162Backup Bolt225801,313800Non-prefixed global variable
#163Knowledge Base documentation & wiki plugin – BasePress Docs226711,7672k+Non-prefixed global variable
#164Borderless – Addons and Templates for Elementor224381,3885k+Non-prefixed global variable
#165Better Messages – Chat Rooms, Group Chat, Private Messages & AI Chat Bots221,6072,02010k+Direct Query
#166Better WordPress Minify224124848k+Non Singular String Literal Domain
#167Captcha by BestWebSoft – Advanced Spam Protection, Math & OCR-Friendly Captcha for Site Forms2249329510k+Text Domain Mismatch
#168Cart Lift – Abandoned Cart Recovery for WooCommerce and EDD226697691k+Output is not escaped
#169Cleanup Action Scheduler225451,3061k+Non-prefixed global variable
#170Clearfy Cache – WordPress optimization plugin, Minify HTML, CSS & JS, Defer222,8581,27050k+Text Domain Mismatch
#171Code Profiler – WordPress Performance Profiling and Debugging Made Easy222654008k+Non-prefixed global variable
#172Accept PayPal Payments using Contact Form 722359127600Text Domain Mismatch
#173Passster – Password Protect Pages and Content225391,41910k+Non-prefixed global variable
#174Cozy Blocks – Page Builder for Gutenberg Editor & FSE with 600+ Patterns, 58 Blocks & Templates222,1754,2107k+Non-prefixed global variable
#175RegistrationMagic – Custom Registration Forms, User Registration, Payment, and User Login223,6535,0848k+Non-prefixed global variable
#176Data Tables Generator by Supsystic2215815210k+Exception output is not escaped
#177Database Access with Adminer229832,5531k+Non-prefixed global variable
#178Directorist: AI-Powered Business Directory, Listings & Classified Ads225492,17520k+Non-prefixed global variable
#179DirectoryPress – Business Directory And Classified Ad Listing224,7872,795800Text Domain Mismatch
#180Download Manager222,5131,462100k+Output is not escaped
#181Diverse Solutions IDX Real Estate Listings & MLS Search227456051k+Heredoc Output Not Escaped
#182Dynamic QR Code – generator222382086k+Missing direct file access protection
#183E2Pdf – Export Pdf Tool for WordPress221,07583610k+Unsafe printing function
#184Easy Social Feed – Social Photos Gallery and Post Feed for WordPress221,5671,27730k+Non-prefixed global variable
#185easyReservations225,3072,480800Text Domain Mismatch
#186EleSpare – News, Magazine and Blog Addons for Elementor227331,42310k+Non-prefixed global variable
#187ERP: Complete HR, Accounting & CRM Suite Built for WooCommerce228285,9695k+Direct Query
#188Estatik Real Estate Plugin223,04932510k+Text Domain Mismatch
#189Events Maker by dFactory225888191k+Output is not escaped
#190Events Manager – Calendar, Bookings, Tickets, and more!224,7135,66070k+Output is not escaped
#191FACTO – Facturación Electrónica22242432400Request data is not unslashed
#192Falang multilanguage for WordPress227167691k+Output is not escaped
#193File Manager Pro – Filester22565391100k+Request data is not unslashed
#194Finale Lite – Sales Countdown Timer & Discount for WooCommerce221,0314514k+Output is not escaped
#195FireBox Popups – Increase Sales and Grow Your Email List221538127k+Non-prefixed global variable
#196Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder22407236700k+Text Domain Mismatch
#197Notification Bar, Announcement and Cookie Notice WordPress Plugin – FooBar221,3211,3713k+Non-prefixed global variable
#198Five Star Restaurant Menu and Food Ordering227526095k+Output is not escaped
#199FunnelKit Payment Gateway for Stripe WooCommerce2224432120k+Input is not sanitized
#200GeoDirectory – WP Business Directory Plugin and Classified Listings Directory224,4663,97210k+Output is not escaped