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
#5351WP Delete User Accounts80107800Missing direct file access protection
#5352WP Social Ninja – Embed Social Feeds, User Reviews & Chat Widgets80261830k+Missing direct file access protection
#5353ActivityPub81673056k+Non-prefixed global variable
#5354AI81117930k+Non-prefixed global variable
#5355Folder Excluder for AIO WP Migration81851k+Non-prefixed function
#5356Auto iFrame812113k+Input is not sanitized
#5357Auto Post Expiration81124800Text Domain Mismatch
#5358Great Restaurant Menu WP81891001k+Text Domain Mismatch
#5359Ceylon Demo Installer81119400Non-prefixed function
#5360Cf7 Icons and Labels81164500Text Domain Mismatch
#5361Change Permalink Helper8155900Direct Query
#5362Checklist in Post81147400Missing Version
#5363Column Ordering For Elementor812161k+Text Domain Mismatch
#5364cookie-cat8114271k+Non-prefixed function
#5365Countdown Block8114104k+wp function not compatible with requires wp
#5366Custom Login Css81100400Missing direct file access protection
#5367Disable Gutenberg Blocks – Block Manager816103k+trademarked term
#5368eCommerce Shipping Dashboard by UPS for WooCommerce816351k+Non-prefixed constant
#5369ElasticPress81136558k+Non-prefixed hook name
#5370External Thumbnail816520k+Missing nonce verification
#5371Faster Pagination811101k+Output is not escaped
#5372Fullwidth Templates for Any Theme & Page Builder81122320k+Non-prefixed constant
#5373Gravity Forms CLI Add-On8131420k+Missing direct file access protection
#5374GSheetConnector for Elementor Forms – Sync Elementor Forms to Google Sheets8111129k+Non-prefixed global variable
#5375GIFTiT – Free Gifts for WooCommerce81433572k+Non-prefixed global variable
#5376JivoChat Live Chat – WP live chat plugin for WordPress81271320k+wp function not compatible with requires wp
#5377LoftLoader81171970k+Missing direct file access protection
#5378Max Mega Menu – StoreFront Integration811222k+Text Domain Mismatch
#5379Migrate Guru – Site Migration & Cloning8178200k+Database parameter is not escaped
#5380Nice Search8145900Input is not sanitized
#5381OG — Better Share on Social Media81145130k+Non-prefixed hook name
#5382Order Approval for Woocommerce8132081k+Non-prefixed global variable
#5383Page Excerpt811113k+Missing Arg Domain
#5384Pagebar2811937900Non-prefixed global variable
#5385Payfast Gateway for WooCommerce812182k+Missing nonce verification
#5386Portfolio Block – The Ultimate Project & Portfolio Builder8165800Offloaded Content
#5387Post Type Archive Descriptions811141k+Missing direct file access protection
#5388Price Table Block811516900file system operations mkdir
#5389Progress Bars811514500file system operations mkdir
#5390Recent Posts FlexSlider81131800Output is not escaped
#5391Redirect by Custom Field8156600Nonce verification recommended
#5392Select and Multi-Select Field for Contact Form 78125122k+Text Domain Mismatch
#5393Simple Page Redirect813710k+Request data is not unslashed
#5394Simple Site Map Page81914k+Output is not escaped
#5395Loops & Logic811132k+Missing direct file access protection
#5396Team Member Block8115141k+file system operations mkdir
#5397Timed Content For Beaver Builder812981k+date date
#5398Toggle Content811612700file system operations mkdir
#5399Typing Text811516600file system operations mkdir
#5400Appointment Bookings for Zoom GoogleMeet and more – Wappointment8122521k+Non-prefixed class