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
#301WPSSO Core – Complete Schema Markup and Meta Tags221,4074125k+Missing Translators Comment
#302WUPO Group Attributes for WooCommerce225921,391400Non-prefixed global variable
#303YaySMTP – WP Mail SMTP with Email Logs, Tracking & Reports2265443510k+Exception output is not escaped
#304YITH WooCommerce Ajax Search224081,65930k+Non-prefixed global variable
#305ЮKassa для WooCommerce225901689k+Short PHP open tag found
#306Recipe Cards For Your Food Blog from Zip Recipes221,1261,7311k+Non-prefixed global variable
#307Print Labels with Barcodes. Create price tags, product labels, order labels for WooCommerce231,1851,0271k+Text Domain Mismatch
#308Gutenberg Blocks – ACF Blocks Suite231,0971,449400Non-prefixed global variable
#309Advanced Custom Fields: Extended231,885329100k+Text Domain Mismatch
#310Frontend Admin by DynamiApps235,9383,2089k+Text Domain Mismatch
#311Custom WooCommerce Checkout Fields Editor237551,3862k+Non-prefixed global variable
#312Admin and Site Enhancements (ASE)23137330200k+Nonce verification recommended
#313Advanced Menu Manager Pro – Built for Content-heavy WordPress Sites to Add, Filter, Lock, and Edit Menus Easily235451,397400Non-prefixed global variable
#314Advanced Ads – Ad Manager & AdSense23559719100k+Non-prefixed global variable
#315Advanced Custom Fields (ACF®)232,4561,2182m+Text Domain Mismatch
#316Advanced Form Integration — Connect Forms to 200+ Apps235,7834,68710k+wp function not compatible with requires wp
#317Advanced Product Labels for WooCommerce2392155920k+Text Domain Mismatch
#318AI Engine – The Chatbot, AI Framework & MCP for WordPress23408539100k+error log error log
#319Affiliate Super Assistent231,2802671k+Text Domain Mismatch
#320Fullscreen Menu235371,2872k+Non-prefixed global variable
#321AR for WordPress23151499400Non-prefixed global variable
#322Autocomplete Address and Location Picker for WooCommerce236301,2992k+Non-prefixed global variable
#323Autoptimize23288191800k+Output is not escaped
#324Shortcodes and extra features for Phlox theme2341242490k+Output is not escaped
#325BA Book Everything231,1841,08610k+Output is not escaped
#326Beds24 Online Booking235323742k+wp function not compatible with requires wp
#327Kadence Security – Password, Two Factor Authentication, and Brute Force Protection231,053967700k+Missing Translators Comment
#328BlossomThemes Email Newsletter2333723920k+Output is not escaped
#329Booking calendar, Appointment Booking System231,0791,1253k+Output is not escaped
#330BSK PDF Manager231,5766257k+Text Domain Mismatch
#331BuddyDrive237221,5971k+Non-prefixed global variable
#332BuddyPress235849,012100k+Non-prefixed function
#333Builderall for WordPress234,7821,3081k+Text Domain Mismatch
#334Announcement & Notification Banner – Bulletin239301,5762k+Non-prefixed global variable
#335Burger Companion233,27447210k+Text Domain Mismatch
#336Business Directory Plugin – Easy Listing Directories for WordPress236111,06310k+Non-prefixed global variable
#337Cart Notices for WooCommerce236394742k+Text Domain Mismatch
#338Products Suggestions for WooCommerce23707505700Output is not escaped
#339Grid & Styler For Contact Form 7 And Divi235481,341500Non-prefixed global variable
#340All In One Login — Login Page Security and Customization for WordPress with Google reCAPTCHA, Social Login, Temporary Login, 2FA, and more.237501,35960k+Non-prefixed global variable
#341Classified Listing – AI-Powered Classified ads & Business Directory231552,0749k+Non-prefixed global variable
#342CLUEVO LMS, E-Learning Platform231,8431,176400Text Domain Mismatch
#343Content Aware Sidebars – Fastest Widget Area Plugin239931,73830k+Non-prefixed global variable
#344Content Egg – Affiliate Product Importer & Price Comparison231,2451,27510k+Non-prefixed global variable
#345Contest Gallery – Upload & Vote Photos, Media, Sell with PayPal & Stripe239,31526,6441k+Non-prefixed global variable
#346Free Theme Builder for Elementor – CRT Addons (Header, Footer, Archive, WooCommerce & 50+ Widgets)237912,331400Non-prefixed global variable
#347Currency Exchange for WooCommerce23692505500Output is not escaped
#348CWW Companion233072231k+Output is not escaped
#349Auto Post Cleaner237151,3781k+Non-prefixed global variable
#350Disable Bloat for WordPress & WooCommerce238631,32510k+Non-prefixed global variable