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

RankPluginScoreErrorsWarningsInstallsUpdatedTop Issue
#51WPJAM Basic203283564k+Output is not escaped
#52Store Locator WordPress212,3721,57210k+Text Domain Mismatch
#53Backup Migration219811,09380k+Non-prefixed global variable
#54bbPress219293,672100k+Non-prefixed function
#55Pinpoint Booking System – Version 2216343283k+Missing direct file access protection
#56rtMedia for WordPress, BuddyPress and bbPress213636338k+Non-prefixed constant
#57CallTrackingMetrics219232863k+Unsafe printing function
#58Captcha Them All213003236k+Output is not escaped
#59CartFlows – Funnel Builder & Checkout Plugin for WooCommerce21461614200k+Text Domain Mismatch
#60Smart Grid-Layout Design for Contact Form 7211,12673410k+Output is not escaped
#61Comet Cache2185724520k+Output is not escaped
#62Cost Calculator Builder2132276530k+Non-prefixed global variable
#63Free Downloads WooCommerce214303594k+Output is not escaped
#64Duplicator – Backups & Migration Plugin – Cloud Backups, Scheduled Backups, & More212,5721,2771m+Output is not escaped
#65Envo Extra2187860020k+Text Domain Mismatch
#66eRoom – Webinar & Meeting Plugin for Zoom, Google Meet, Microsoft Teams211864379k+Non-prefixed global variable
#67ERP: Complete HR, Accounting & CRM Suite with Recruitment and WooCommerce CRM Support218295,9665k+Direct Query
#68Eupago Gateway For Woocommerce216123202k+Output is not escaped
#69EventPrime – Events Calendar, Bookings and Tickets218724,2977k+Non-prefixed global variable
#70Feeds for YouTube (YouTube video, channel, and gallery plugin)21558978100k+Output is not escaped
#71FileOrganizer – WordPress File Manager21536241200k+unlink unlink
#72Campaign Monitor for WordPress213864612k+Non-prefixed global variable
#73If-So Dynamic Content – Elementor & All Page Builders Personalization218897257k+Unsafe printing function
#74Imagify: Optimize Images for Top Speed (Compress & Convert to WebP/AVIF)214208611m+Non-prefixed global variable
#75JCH Optimize219531334k+Output is not escaped
#76LA-Studio Element Kit for Elementor218,3901,96410k+Text Domain Mismatch
#77MailChimp Subscribe Form, Optin Builder, PopUp Builder, Form Builder211,1333,0112k+Non-prefixed global variable
#78Mapster WP Maps213,4402,9033k+Text Domain Mismatch
#79Modular DS: Monitor, update, and backup multiple websites211618140k+Exception output is not escaped
#80MotoPress Hotel Booking213,0611,03710k+Text Domain Mismatch
#81Points Management System For Gamification, Ranks, Badges, and Loyalty Rewards Program – myCred211,4693,33310k+Non-prefixed global variable
#82OneLogin SAML SSO215083307k+wp function not compatible with requires wp
#83Packeta218023338k+Exception output is not escaped
#84Landing Page Builder – Coming Soon page, Maintenance Mode, Lead Page, WordPress Landing Pages211,1732,9839k+Non-prefixed global variable
#85Paid Membership Subscriptions – Effortless Memberships, Recurring Payments & Content Restriction211,9185,06510k+Non-prefixed hook name
#86User Profile Builder – Beautiful User Registration Forms, User Profiles & User Role Editor216961,48350k+Nonce verification recommended
#87PublishPress Planner – Editorial Calendar, Marketing Content, Kanban Board216038906k+Output is not escaped
#88Razorpay Quick Payments21399633k+Exception output is not escaped
#89Five Star Restaurant Reservations – WordPress Booking Plugin211,0991,14710k+Output is not escaped
#90Rocket Maintenance Mode & Coming Soon Page211,1761,4064k+Non-prefixed global variable
#91Royal Addons for Elementor – Addons and Templates Kit for Elementor2113,0112,530600k+Text Domain Mismatch
#92Seamless Donations is Sunset216005142k+Text Domain Mismatch
#93Professional Social Sharing Buttons, Icons & Related Posts – Shareaholic2132718110k+Output is not escaped
#94Smart Forms – when you need more than just a contact form217765745k+Output is not escaped
#95Accept Stripe Payments2137388220k+Missing nonce verification
#96Testerwp ecommerce companion218114361k+Text Domain Mismatch
#97ThirstyAffiliates – Affiliate Links, Link Branding, Link Tracking & Marketing Plugin2119066030k+Non-prefixed global variable
#98Revive Social – Social Media Auto Post and Scheduling Automation Plugin2125542520k+Non-prefixed hook name
#99Buckaroo Woocommerce Payments Plugin215633262k+Exception output is not escaped
#100WCFM – Frontend Manager for WooCommerce214,7215,06720k+Non-prefixed global variable