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
#5551Auto Subpage Menu8556800Database parameter is not escaped
#5552Backlinks Saver85353k+Deprecated parameter value found
#5553Popups – Submission Messages For Contact Form 785273k+Input is not sanitized
#5554Fetchify8515419600Text Domain Mismatch
#5555Comments Import & Export8511292k+wp function not compatible with requires wp
#5556Country Dropdown For Contact Form 785174800Text Domain Mismatch
#5557Custom Classes85582k+Request data is not unslashed
#5558DCO Comment Attachment85555k+Missing nonce verification
#5559Easy UTM Tracking with Contact Form 7853102k+Input is not validated
#5560reCaptcha Add-On for FormCraft854167k+Missing Version
#5561GamiPress – Leaderboards Include/Exclude Users85113400Output is not escaped
#5562GazChap's WooCommerce Auto Category Product Thumbnails85481k+trademarked term
#5563Genesis Easy Columns85812k+Missing direct file access protection
#5564Hello Dolly8592600k+Output is not escaped
#5565Hide Any Page8582500Output is not escaped
#5566HSTS Ready853113k+Input is not validated
#5567Madquick WP Legal Pages – One Click, 100% Free85555600Non-prefixed global variable
#5568Marquee Running Text851175k+Missing direct file access protection
#5569MD5 Media Renamer85819400Non-prefixed global variable
#5570No External Links857265k+Database parameter is not escaped
#5571News Element Elementor Blog Magazine85174695400Non-prefixed global variable
#5572Payment Integration Wompi8544111k+Missing Arg Domain
#5573PlayerJS – Free Custom HTML5 Video and Audio Player Builder851131k+Missing Version
#5574Popup Message Notifier for Contact Form 7851721k+Short PHP open tag found
#5575Portfolios85102700Output is not escaped
#5576Power Captcha reCAPTCHA85471k+Database parameter is not escaped
#5577Pronamic Google Maps8524181k+Non-prefixed global variable
#5578LocaliQ – Tracking Code8511112k+Non-prefixed function
#5579Referrer Input for Contact Form 785392500wp function not compatible with requires wp
#5580Remove Footer Credit8573170k+Non-prefixed global variable
#5581Review widget addon for Elementor85891k+Non-prefixed function
#5582Smoothscroller8592500Output is not escaped
#5583States, Cities, and Places for WooCommerce851011926k+Non-prefixed global variable
#5584Stock market charts from finviz8581400Missing Arg Domain
#5585The Excerpt re-reloaded8570600Output is not escaped
#5586TinyMCE Color Picker85271k+Input is not sanitized
#5587Vanilla PDF Embed85833k+parse url parse url
#5588VK Blocks85794100k+Missing direct file access protection
#5589Widget CSS Classes8547880k+Non Singular String Literal Domain
#5590Free Shipping Per Product for WooCommerce852133k+Text Domain Mismatch
#5591All Currencies for WooCommerce851731k+Missing Translators Comment
#5592WP fail2ban Add-on for Contact Form 7851018800Non-prefixed constant
#5593WP fail2ban Add-on for Gravity Forms851018600Non-prefixed constant
#5594WP Protect Content85771k+Output is not escaped
#5595WP Revisions Control859640k+wp function not compatible with requires wp
#5596Yuma Companion85107400Missing direct file access protection
#5597Zoho Forms – Drag & Drop Form Builder for Websites – Contact Forms, Payment Forms, Order Forms & More8516210k+Non Enqueued Script
#5598Featured image to All-Posts8665400Nonce verification recommended
#5599Advanced Queries8661110k+Non-prefixed constant
#5600AM LottiePlayer86512800Non-prefixed global variable