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
#5751Coupon & Discount Code Reveal Button8937101k+wp function not compatible with requires wp
#5752CSS89101500Missing Arg Domain
#5753Custom Layouts – Post + Product grids made easy8923224k+Missing Translators Comment
#5754Disable WP Registration Page89492k+trademarked term
#5755Cool Flipbox – Shortcode & Gutenberg Block8929105k+wp function not compatible with requires wp
#5756Font Awesome89213400k+Missing direct file access protection
#5757FV Clone Screen Options891631k+wp function not compatible with requires wp
#5758Location Add-on For Gravity Forms891816400Text Domain Mismatch
#5759LH Copy Media File89215800wp function not compatible with requires wp
#5760Link View89995700Missing Translators Comment
#5761Loading Page with Loading Screen89491810k+wp function not compatible with requires wp
#5762MAS Elementor89192161k+Non-prefixed hook name
#5763Open Links In New Tab8953900Missing direct file access protection
#5764Page Sidebar for Twenty Seventeen89110141k+Text Domain Mismatch
#5765Popups for Divi899957100k+Text Domain Mismatch
#5766RT Slider8992800Missing direct file access protection
#5767Server IP & Memory Usage Display893530k+Input is not sanitized
#5768Shipping by City for Woocommerce89132400Text Domain Mismatch
#5769Wbcom Designs – Shortcodes & Elementor Widgets For BuddyPress8926184600Non-prefixed hook name
#5770Show modified Date in admin lists89436k+Output is not escaped
#5771SiteLock Security – WP Hardening, Login Security & Malware Scans894491k+Text Domain Mismatch
#5772Slimbox Plugin8992500Non Enqueued Script
#5773Statify89533100k+Direct Query
#5774Superb Table (SEO Optimized Tables With Schema)8944122k+wp function not compatible with requires wp
#5775Széchenyi 2020 Logo8914091k+Text Domain Mismatch
#5776Tawk.To Live Chat8910227100k+wp function not compatible with requires wp
#5777Taxonomy Metadata89494k+Direct Query
#5778Turn Off Comments — Hide Comment Box and Stop Spam89341k+Non-prefixed function
#5779User Admin Simplifier891063210k+Text Domain Mismatch
#5780Password Strength Settings for WooCommerce8917610k+Missing Arg Domain
#5781WP Anywhere Widgets891614700wp function not compatible with requires wp
#5782WP AutoTags89451k+trademarked term
#5783WP Database Backup – Unlimited Database & Files Backup by Backup for WP898551130k+Text Domain Mismatch
#5784WP Featherlight Disabled895112k+trademarked term
#5785WordPress Widgets Shortcode8954500trademarked term
#5786Codevyne SEO Meta Keywords89374k+Non-prefixed function
#5787WPGet API – Connect to any external REST API89151910k+Missing direct file access protection
#5788Advanced Custom Fields: Restrict Color Picker Options90431k+Output is not escaped
#5789Animated Headline905162k+Non-prefixed constant
#5790aThemes Addons for Elementor9013968k+Non-prefixed global variable
#5791Automatically Paginate Posts901222k+wp function not compatible with requires wp
#5792Avantex Companion90351001k+Non-prefixed global variable
#5793Toolbox for Beaver Builder9087600Missing Version
#5794Beehive Analytics – Google Analytics Dashboard906112220k+Text Domain Mismatch
#5795Billbee – Auftragsabwicklung, Warenwirtschaft, Automatisierung9087500Non-prefixed function
#5796Canvas90211510k+Non-prefixed global variable
#5797Contact Form 7 Google Analytics90657k+trademarked term
#5798Child Themify901047k+Missing direct file access protection
#5799Compact Archives908142k+Non-prefixed function
#5800Conditional Blocks – Advanced Content Visibility Control for WordPress9010222k+Missing direct file access protection