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
#5801Content Anchor Links90651k+Non-prefixed hook name
#5802Continue Shopping Anywhere for WooCommerce902110700Text Domain Mismatch
#5803CookiePro | Simplify Compliance with GDPR & EU Cookie Laws903751k+Missing Arg Domain
#5804Cloudflare SSL by Weslink90372k+trademarked term
#5805Daddy Plus90355528k+Non-prefixed global variable
#5806Disable Revisions90551k+Direct Query
#5807Prevent Content Theft [Disable Right Click]90461k+Missing Version
#5808Disable RSS9080500Missing Arg Domain
#5809Dynamic Year Block – display a copyright notice in your footer with the current year905282k+Non-prefixed global variable
#5810Easy Google Fonts901226100k+Non-prefixed hook name
#5811Easy Auto SKU Generator for WooCommerce90211310k+Missing direct file access protection
#5812Featured Image Admin Thumb9071020k+Non-prefixed hook name
#5813Shipping Live Rates and Access Points for UPS for WooCommerce906117k+Non-prefixed global variable
#5814Flipdish Ordering System90511400Non-prefixed function
#5815Fusion Page Builder : Extension – Button9045400Input is not validated
#5816GamiPress – WooCommerce Points Per Purchase Total90105400trademarked term
#5817Genesis Custom Blocks9072210k+Non-prefixed function
#5818Multiple Columns for Gravity Forms9011710k+Missing direct file access protection
#5819ShareThis Dashboard for Google Analytics90427280k+Non-prefixed global variable
#5820Gravity Forms – Placeholders add-on90552k+trademarked term
#5821Hide Related Video Youtube90381k+Direct Query
#5822Lawwwing | Textos legales web y Banner de cookies903113700Text Domain Mismatch
#5823If-So Conditional Content for Elementor90511k+Missing direct file access protection
#5824Include Mastodon Feed90113800Non-prefixed global variable
#5825OAuth Single Sign On – SSO (OAuth Client)90269366k+wp function not compatible with requires wp
#5826Nav Menu Item Duplicator90164500wp function not compatible with requires wp
#5827Shipping Cost on Product Page Calculator for WooCommerce90314400Non-prefixed global variable
#5828Page and Post Restriction901432k+wp function not compatible with requires wp
#5829Pantheon HUD90461k+Input is not sanitized
#5830PHP Native Password Hash90762k+Non-prefixed global variable
#5831Payment Forms for Paystack90494233k+Text Domain Mismatch
#5832Photection – Easy image protection for WordPress90491k+Non-prefixed global variable
#5833PromPress9084700Missing direct file access protection
#5834Publish To Apple News9088225k+Text Domain Mismatch
#5835Quotes for WooCommerce901862654k+Text Domain Mismatch
#5836Reading Position Indicator90223800Dynamic hook name
#5837Relevanssi Live Ajax Search904227k+Non-prefixed global variable
#5838SEO SIMPLE PACK909997100k+Non-prefixed global variable
#5839Show Page URL90631k+Missing direct file access protection
#5840Simple Colorbox901111k+Missing Arg Domain
#5841Slider by Soliloquy – Responsive Image Slider for WordPress904702930k+Text Domain Mismatch
#5842Tabbed Contents Block – Display Content in Tabbed Layout90436800Non-prefixed global variable
#5843Three Column Screen Layout90581k+Direct Query
#5844Mobile Detect90413k+Exception output is not escaped
#5845UltraAddons for Elementor90652600wp function not compatible with requires wp
#5846VK Ads Pixel plugin90642k+Missing direct file access protection
#5847WP-Font-Resizer90146400wp function not compatible with requires wp
#5848WP-Speech-Balloon90510400trademarked term
#5849AAA Option Optimizer91179k+Database parameter is not escaped
#5850Advanced Cron Manager – debug & control91309030k+Non-prefixed global variable