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
#4101Auto Hide Admin Bar99204k+Missing direct file access protection
#4102Enhanced Responsive Images991250k+Missing direct file access protection
#4103Better Aria Label Support99305k+Missing direct file access protection
#4104SMTP for Contact Form 799501k+Missing direct file access protection
#4105Columns99213k+Missing Version
#4106Default Featured Image992260k+Missing direct file access protection
#4107Disable Embeds992010k+Missing direct file access protection
#4108Disable Login Language Switcher99201k+Missing direct file access protection
#4109Display Featured Image In Post List99203k+Missing direct file access protection
#4110Email Address Obfuscation99302k+wp function not compatible with requires wp
#4111Event Single Page Builder For The Events Calendar99126k+Non-prefixed class
#4112Featured Image99201k+Missing direct file access protection
#4113Filter for Divi99202k+Missing direct file access protection
#4114Image Title Remove99201k+Missing direct file access protection
#4115Inline Spoilers99211k+Missing direct file access protection
#4116Insert Special Characters99303k+Missing direct file access protection
#4117Language Fallback99215k+Missing direct file access protection
#4118Masks Form Fields99209k+Missing direct file access protection
#4119Ninja Tables – Easy Data Table Builder993080k+Missing direct file access protection
#4120Post Type Transfer99443k+Missing direct file access protection
#4121Printify for WooCommerce992310k+Missing direct file access protection
#4122Protect Uploads992140k+Missing direct file access protection
#4123Say What?993240k+Missing direct file access protection
#4124Snow Monkey Editor992330k+Non-prefixed global variable
#4125SO Page Builder Animate99204k+Missing direct file access protection
#4126Solace Extra991510k+Non-prefixed class
#4127Specia Companion99704k+Missing direct file access protection
#4128Super block slider – Image & content slider99129k+Missing direct file access protection
#4129Syntax-highlighting Code Block (with Server-side Rendering)99111k+Missing direct file access protection
#4130Thumbnail Upscale99203k+Missing direct file access protection
#4131Very Simple Google Maps99203k+Missing direct file access protection
#4132Widget Post Slider99201k+Missing direct file access protection
#4133Playlist Player for YouTube99312k+Missing direct file access protection
#4134Automatic Cache Flusher for W3 Total Cache100104k+Missing direct file access protection
#4135Definitely allow mobile zooming100107k+Missing direct file access protection
#4136Disable Emojis (GDPR friendly)1001060k+Missing direct file access protection
#4137Disable XML-RPC10010200k+Missing direct file access protection
#4138Generate Child Theme100109k+Missing direct file access protection
#4139Hyperlink Group Block100107k+Missing direct file access protection
#4140Makeiteasy Slider100101k+Missing direct file access protection
#4141Nelio Content – Editorial Calendar & Social Media Auto-Posting100105k+Missing direct file access protection
#4142Shortcode Redirect1001010k+Missing direct file access protection
#4143Splide Carousel Block100103k+Missing direct file access protection