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
#3851WC Speed Repair4234741k+Non-prefixed global variable
#3852Widget Visibility Time Scheduler4270341k+Output is not escaped
#3853WP Child Theme Generator42356620k+Request data is not unslashed
#3854WP Cron Cleaner425138500Unsafe printing function
#3855WP Fingerprint4234479k+Direct Query
#3856WP QuickLaTeX4241604k+Non-prefixed global variable
#3857WP Responsive Table4242106k+Output is not escaped
#3858Advanced All in One Admin Search by WP Spotlight422525900Missing Version
#3859WP Widget Clipboard – Duplicate widgets intuitively425119800Output is not escaped
#3860WPB Custom Tab Manager for WooCommerce – Add, Edit & Reorder Tabs429532500Output is not escaped
#3861WPFomo42459600Output is not escaped
#3862Yandex.Metrika421520900Unsafe printing function
#3863Admin Menu Tree Page View43176910k+Nonce verification recommended
#3864AdWords Conversion Tracking Code4326251k+Non Singular String Literal Domain
#3865AMP4363362400k+Non-prefixed hook name
#3866Animation Builder – An interface for adding scroll-triggered animations43767900Missing Version
#3867Anonymous Restricted Content4322241k+Unsafe printing function
#3868Auto Alt Text4352134k+Exception output is not escaped
#3869Charla Live Chat433313500Output is not escaped
#3870Click to Call or Chat Buttons434761k+Output is not escaped
#3871Comment Reply Email Notification4344193k+Output is not escaped
#3872Simple Mortgage Calculator436731k+Text Domain Mismatch
#3873Custom Menu438311400wp function not compatible with requires wp
#3874Customize Login Image433293k+Unsafe printing function
#3875Customize Snapshots43942500Nonce verification recommended
#3876Database Addon For WPForms ( wpforms entries ) – WPFormsDB43175320k+Nonce verification recommended
#3877Directorist – WPML Integration4310134400Non-prefixed hook name
#3878Disable Gutenberg432347500k+Nonce verification recommended
#3879Disable WP Notification43742510k+Output is not escaped
#3880Email Notification on Login433371k+Unsafe printing function
#3881F4 Total Stock Value for WooCommerce4327121k+Output is not escaped
#3882Floating Awesome Button (Sticky Button, Popup, Toast) & 200+ Website Custom Interactive Element4366109800Missing direct file access protection
#3883GD bbPress Tools4315611k+Input is not sanitized
#3884Good Old Twitter Feed Widget4311010400Text Domain Mismatch
#3885Per User Prompt for Google Authenticator43852400Nonce verification recommended
#3886Event Tracking for Gravity Forms43342520k+rand mt rand
#3887Insert Blocks Before or After Posts Content4342151k+Output is not escaped
#3888jQuery UI Widgets4313151k+Unsafe printing function
#3889MembershipWorks Login Connector432881800Request data is not unslashed
#3890Lightbox432910700Unsafe printing function
#3891Post Carousel Slider for Elementor43133233k+Text Domain Mismatch
#3892Post title marquee scroll4343251k+Output is not escaped
#3893Pro Categories Widget43599800Output is not escaped
#3894reCAPTCHA for MW WP Form43371430k+Non Singular String Literal Domain
#3895Redirect List4334221k+Output is not escaped
#3896Rut Chileno con Validación para WooCommerce4335161k+Text Domain Mismatch
#3897Secure Passkeys43145831k+Exception output is not escaped
#3898Simple Side Tab43281710k+Unsafe printing function
#3899Smart App Banner434749600Output is not escaped
#3900Snazzy Maps4396230k+Request data is not unslashed