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
#5201Ceylon Extra778941500Text Domain Mismatch
#5202ELEX Hide WooCommerce Shipping Methods7783541k+Text Domain Mismatch
#5203FD Footnotes Plugin772851k+Non Singular String Literal Domain
#5204RSS Aggregator by Feedzy – Feed to Post, Autoblogging, News & YouTube Video Feeds Aggregator773728240k+Non-prefixed global variable
#5205WP-FormAssembly774152k+Nonce verification recommended
#5206f(x) Editor771431k+Unsafe printing function
#5207GDPR773912110k+Non-prefixed global variable
#5208Embed Files from Google Drive774355k+Nonce verification recommended
#5209Gravity Forms Auto Placeholders7798700trademarked term
#5210Index WP Users For Speed7710351k+Non-prefixed global variable
#5211Mailster Mailgun Integration77165500Missing Translators Comment
#5212Master QR Code Generator – Fast & Easy QR Code Creator772159400Non-prefixed global variable
#5213PDF Smart Viewer for Elementor7718161k+Non-prefixed global variable
#5214Posts List7711157k+Non-prefixed hook name
#5215Pushover Integration for WooCommerce771077800Text Domain Mismatch
#5216Remove Taxonomy Slug77232400Output is not escaped
#5217Responsive Tabs For Elementor7757271k+Text Domain Mismatch
#5218Scroll Magic Addon for Elementor773447400Text Domain Mismatch
#5219Shipping Zone Duplicator for WooCommerce771014800Nonce verification recommended
#5220Display custom fields in the frontend – Post and User Profile Fields771718600Non-prefixed global variable
#5221Lead Generation Contact Widget & AI Chatbot: Chat Button, Phone Call, Telegram, Email – SiteLeads7717110k+Exception output is not escaped
#5222Supreme Google Webfonts771271k+Text Domain Mismatch
#5223SureRank SEO – Smart Assistant with Meta Tags, Social Preview, XML Sitemap, and Schema775895300k+Non-prefixed hook name
#5224Table Of Contents Block7715810k+wp function not compatible with requires wp
#5225Tagembed Social Feeds Widget772113710k+Non-prefixed function
#5226Taggbox – Free Social Media Widgets, Review Badges & Shoppable UGC77231131k+Direct Query
#5227Template Kit – Import774160400k+Non-prefixed global variable
#5228Toggle wpautop774159k+trademarked term
#5229Unattach77411900Nonce verification recommended
#5230Username7758600Deprecated function: screen_icon
#5231Widget Classes77571k+Missing nonce verification
#5232Lorem Ipsum Generator7779500Missing direct file access protection
#5233WP Night Mode77811700Non-prefixed function
#5234WP Upload Size776142k+Non-prefixed function
#5235wpsection771315543k+Non-prefixed global variable
#5236X-Currency – The Ultimate WooCommerce currency switcher for a smoother shopping experience7717771k+Non-prefixed global variable
#5237Accordion Blocks789310k+Unsafe printing function
#5238Support For Icomoon with Advanced Custom Fields781561k+Output is not escaped
#5239ELEX WooCommerce Address Validation & Google Address Autocomplete Plugin787340700Missing Arg Domain
#5240AffiliateWP – Affiliate QR Codes783281k+Text Domain Mismatch
#5241AffiliateWP – Allow Own Referrals783710500Text Domain Mismatch
#5242AI Provider for Anthropic7813130k+Exception output is not escaped
#5243Animated Text Block – Add Typing and Looping Text Effects785254k+Non-prefixed class
#5244Biteship Shipping782516500wp function not compatible with requires wp
#5245Booking System Trafft78319400Nonce verification recommended
#5246Bookvault781310700Nonce verification recommended
#5247Player for SoundCloud – Embed and Play Audio Tracks7817241k+Text Domain Mismatch
#5248Floating Ads Bottom78912k+Setting is missing a sanitization callback
#5249Forget About Shortcode Buttons78112520k+Missing direct file access protection
#5250Frontend Product Editor for WooCommerce787631400Text Domain Mismatch