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
#5701Cudazi Scroll to Top8874500Missing Version
#5702Custom Header Footer Scripts for Customizer88652k+Non-prefixed function
#5703Duplicate Pages, Posts and CPT88255k+Input is not sanitized
#5704Emoji Settings88452k+Input is not sanitized
#5705301 Redirects – Redirect Manager88671300k+Non-prefixed global variable
#5706AH Google Analytics Code8862500Output is not escaped
#5707Facebook Chat Plugin – Live Chat Plugin for WordPress887880k+trademarked term
#5708Fancy Admin UI881031k+Missing Version
#5709WP OPcache8862510k+Non-prefixed global variable
#5710Fourteen Colors881618k+Text Domain Mismatch
#5711Generic Elements881,922140500Text Domain Mismatch
#5712Genesis Blocks88154940k+Offloaded Content
#5713G-Forms hCaptcha88753k+Missing direct file access protection
#5714Hindi-To-Lat88314400Direct Query
#5715Image Hover Effects – WordPress Plugin88253k+Input is not sanitized
#5716Import Markdown – Versatile Markdown Importer882592k+Missing Arg Domain
#5717WPCode – Insert Headers and Footers + Custom Code Snippets – WordPress Code Manager8827333m+wp function not compatible with requires wp
#5718SimpleMaps888119600wp function not compatible with requires wp
#5719Live News – Responsive News Ticker88992k+Database parameter is not escaped
#5720Minimal Coming Soon – Coming Soon Page887143100k+Non-prefixed global variable
#5721Modular Custom CSS8871400Output is not escaped
#5722mypace Custom Title Tag8836500Input is not sanitized
#5723Piotnet Addons For Elementor887442630k+Text Domain Mismatch
#5724Rel Nofollow8891700Missing Arg Domain
#5725WP REST API Meta Endpoints885031k+Missing Arg Domain
#5726Scriptless Social Sharing888910k+Missing direct file access protection
#5727Simple Custom CSS Plugin88175100k+wp function not compatible with requires wp
#5728SiteGround Email Marketing8818751k+Non-prefixed namespace
#5729SJ Cornerstone Addon88570400Text Domain Mismatch
#5730Smart Blocks – WordPress Gutenberg Blocks8810761k+Post Not In post not in
#5731Table Sorter88456k+Not In Footer
#5732Text Unfold For Elementor8812203k+Text Domain Mismatch
#5733The Events Calendar: Category Colors8818425k+Non-prefixed global variable
#5734Transferito: WP Migration8816115500Non-prefixed global variable
#5735Ukr-To-Lat883135k+Direct Query
#5736WPBakery Page Builder Simple All Responsive88461k+Missing direct file access protection
#5737FlexMeeting – Webinar & Meeting Plugin for Jitsi Meet886181k+Nonce verification recommended
#5738Draft – Tailwind CSS for WordPress.88105600Text Domain Mismatch
#5739File Uploads Addon for WooCommerce888155k+Missing direct file access protection
#5740Divi Carousel Free (Divi5 Support)882682630k+Text Domain Mismatch
#5741WP Insert Code88641k+trademarked term
#5742WP jQuery Plus8875900trademarked term
#5743A Random Number8935800Non-prefixed function
#5744Better Variation Price for WooCommerce895121k+Nonce verification recommended
#5745Bottom Admin Toolbar89511k+Output is not escaped
#5746Breadcrumb Trail896410k+Non-prefixed hook name
#5747CJdropshipping89423k+Missing Arg Domain
#5748Clarity – Ad blocker for WordPress895192k+Non-prefixed hook name
#5749Clear cache for Timber89201500wp function not compatible with requires wp
#5750Convert to Blocks892112k+Non-prefixed hook name