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
#3051qTranslate X Cleanup and WPML Import38167102800Text Domain Mismatch
#3052Quick Download Button38341232k+Non-prefixed global variable
#3053RDP Wiki Embed386926400Output is not escaped
#3054Recent Posts Plus3811141k+Output is not escaped
#3055Logo Carousel – Display Brand or Client Logos in Slider3852442800Output is not escaped
#3056Responsive Mailform ( Plugin Version ) – easy, responsive, contact, mailform38120107500Output is not escaped
#3057WP REST API – OAuth 1.0a Server38100858k+Text Domain Mismatch
#3058Like This3860171k+Output is not escaped
#3059SCSS WP Editor3811140900Exception output is not escaped
#3060Author Image3851331k+Output is not escaped
#3061Shapely Companion38493910k+Output is not escaped
#3062ShiftNav – Responsive Mobile Menu382493510k+Text Domain Mismatch
#3063Snippet Shortcodes383591334k+Non Singular String Literal Domain
#3064Shutter Reloaded38194951k+Text Domain Mismatch
#3065Simple Expires383239500Non Singular String Literal Domain
#3066Simple JWT Login – Allows you to use JWT on REST endpoints.38712954k+Output is not escaped
#3067Simple Keyword to Link3890493k+Non Singular String Literal Domain
#3068Simple LDAP Login3865331k+Output is not escaped
#3069Simple Visitor Counter384127700Output is not escaped
#3070SimpleShop3852511k+date date
#3071Slickstream: Engagement and Conversions38100192k+Output is not escaped
#3072Slickplan Importer384058400Non-prefixed global variable
#3073Smart Cookie Kit38263813k+Output is not escaped
#3074Smart Maintenance Mode381371281k+Output is not escaped
#3075Social Icons38728310k+Output is not escaped
#3076SOGO Accessibility38147405k+Non Singular String Literal Domain
#3077Stock Market News387111500Output is not escaped
#3078Stock Market Overview3886141k+Output is not escaped
#3079Stock Market Ticker3869143k+Output is not escaped
#3080Stock Quotes List387213600Output is not escaped
#3081Super Simple Slider3855551k+Non-prefixed global variable
#3082Swiper Js Slider3812535400Output is not escaped
#3083Logo Slider , Logo Carousel , Logo showcase , Client Logo3872221k+Output is not escaped
#3084Templatiq383194900Non-prefixed hook name
#3085Product Compare for WooCommerce38551913k+Non-prefixed global variable
#3086Variation Swatches for WooCommerce3845652k+Output is not escaped
#3087Theme Blvd Widget Pack38240171k+Output is not escaped
#3088Broadcast38211071k+Direct Query
#3089TopList.cz381387400Output is not escaped
#3090Trackserver3817356400Input is not sanitized
#3091Plugin Name: Traffic Stats Widget Plugin3869107600Output is not escaped
#3092Trash Duplicate and 301 Redirect38131031k+Nonce verification recommended
#3093TRUENDO | GDPR Compliant Cookie Manager389838600Output is not escaped
#3094Sidebar Login Widget389016700Output is not escaped
#3095Twenty Eleven Theme Extensions3835303k+Output is not escaped
#3096Twiget Twitter Widget3814736500Output is not escaped
#3097Twitter for WordPress3847241k+Output is not escaped
#3098TypePad emoji for TinyMCE38100248k+Text Domain Mismatch
#3099Termly – GDPR/CCPA Cookie Consent Banner38549280k+Non-prefixed global variable
#3100Ultimate Member Widgets for Elementor – Login Form, Register Form & User Directory3817110400Non-prefixed namespace