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
#3551Visual Builder for Contact Form 7402043500Output is not escaped
#3552Visual Editor Custom Buttons4030484k+Output is not escaped
#3553WP Sticky Button – Click to Chat40736410k+Non-prefixed global variable
#3554Webo-facto40411021k+Nonce verification recommended
#3555Wider Admin Menu4076172k+Output is not escaped
#3556Widget Builder404052500Non-prefixed global variable
#3557Widget Menuizer404426600Missing Arg Domain
#3558Widget Visibility Without Jetpack4074475k+Text Domain Mismatch
#3559Wonder Video Embed409444k+Output is not escaped
#3560Preview E-mails for WooCommerce40353730k+Unsafe printing function
#3561NP Quote Request for WooCommerce40911459k+Non-prefixed global variable
#3562Total Sales Counts for WooCommerce4012162700SQL query is not prepared
#3563Wallet for WooCommerce403252420k+Non-prefixed hook name
#3564yubikey-plugin406433400Text Domain Mismatch
#3565All In One SEO Pack for WooCommerce4057253k+Text Domain Mismatch
#3566Simple Registration for WooCommerce4027554k+Missing nonce verification
#3567Word Balloon402012510k+Request data is not unslashed
#3568WP Ajax Load More Pagination and Infinite Scroll406315400Output is not escaped
#3569WP Compress for MainWP402036700Output is not escaped
#3570Custom CSS/JS405834700Text Domain Mismatch
#3571WP Discord Invite407342400Unsafe printing function
#3572Easy PayPal & Stripe Buy Now Button403889610k+Unsafe printing function
#3573WP All Import – Job Listing Import for WP Job Manager4035272k+Output is not escaped
#3574WP Keyword Suggest402941500Non Singular String Literal Domain
#3575WP Meteor Website Speed Optimization Addon40341920k+Output is not escaped
#3576WP Multisite Content Copier/Updater4019144800Interpolated SQL is not prepared
#3577WP Nav Plus4095131k+Output is not escaped
#3578WP Paint – WordPress Image Editor4030296k+Missing Arg Domain
#3579WP Reroute Email401411061k+Output is not escaped
#3580Social Share Buttons & Analytics Plugin – GetSocial.io4097252k+Output is not escaped
#3581WP Tab Widget401283210k+Output is not escaped
#3582WP Theme Test4021397k+Input is not sanitized
#3583WPS Menu Exporter40472210k+Output is not escaped
#3584XLTab – Accordions and Tabs for Elementor Page Builder40317651k+Text Domain Mismatch
#3585My YouTube Channel4054385k+Output is not escaped
#3586Simple Counter4160121k+Unsafe printing function
#3587AMP for WP – Accelerated Mobile Pages416562,40180k+Non-prefixed global variable
#3588ACF: Advanced Taxonomy Selector4156151k+Output is not escaped
#3589AddQuicktag418610100k+Output is not escaped
#3590Advance Bank Payment Transfer Gateway41105621k+Text Domain Mismatch
#3591ACF: Google Map Extended411418800Text Domain Mismatch
#3592Advanced Excerpt41694370k+Unsafe printing function
#3593AffiliateWP – Affiliate Product Rates4184242k+Output is not escaped
#3594AH Display Widgets4152168k+Text Domain Mismatch
#3595Amazon Link Engine4138172k+Output is not escaped
#3596Amazon Web Services4153215k+Missing Translators Comment
#3597Announcer – Sticky Message Banner & Notification Bar411102710k+Output is not escaped
#3598Antispam411141400Missing nonce verification
#3599ATP Call Now41987700Output is not escaped
#3600Authenticator4159441k+Output is not escaped