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
#6551ESTO payment methods98154400wp function not compatible with requires wp
#6552Event Block98511k+Missing direct file access protection
#6553FAQ Block For Gutenberg98354k+trademarked term
#6554Featured Image in Content9831700Missing direct file access protection
#6555Feeds for TikTok (TikTok feed, video, and gallery plugin)985370k+Missing direct file access protection
#6556File Upload Types by WPForms982940k+Non-prefixed function
#6557Filenames to latin98219k+Missing direct file access protection
#6558Filter for Elementor9830700Missing direct file access protection
#6559Find My Blocks – Locate blocks on your site98274k+Non-prefixed function
#6560Flexible Table Block984740k+Non-prefixed constant
#6561Footer Credits98321k+Missing direct file access protection
#6562Formsite | Embed online forms to collect orders, registrations, leads, and surveys9832900Missing direct file access protection
#6563Fusion Page Builder : Extension – Image9842500Missing direct file access protection
#6564Lightbox for Gallery & Image Block983020k+Missing direct file access protection
#6565Genesis Simple Menus983152k+Non-prefixed global variable
#6566Genesis Simple Share983010k+Missing direct file access protection
#6567Google Tag Manager987410k+wp function not compatible with requires wp
#6568Gravity Forms Personality Quiz Add-On9873500Text Domain Mismatch
#6569GravityWP – Count98232k+trademarked term
#6570GravityWP – CSS Selector98244k+trademarked term
#6571Grid Columns98301k+Missing direct file access protection
#6572Guest Author98615k+Missing direct file access protection
#6573GUI for List Category Posts9861600Missing direct file access protection
#6574Gutenbye9840700Missing direct file access protection
#6575Hide Admin Bar from Non-Admins983110k+Missing direct file access protection
#6576Hide Admin Toolbar98319k+Missing direct file access protection
#6577Jetpack Without Promotions98221k+trademarked term
#6578Hide Prices for WooCommerce9843800Missing direct file access protection
#6579Hide Text Shortcode9840400Missing direct file access protection
#6580Hide This98312k+Missing direct file access protection
#6581Hide Comment Author Link98411k+Missing direct file access protection
#6582Highlight Search Terms98407k+Missing direct file access protection
#6583HyperPay Payments9840600Missing direct file access protection
#6584iFrame Block9840800Missing direct file access protection
#6585Image Comparison Block98321k+Missing direct file access protection
#6586Image Rotation Fixer98311k+Missing direct file access protection
#6587WP Image Size Selection98321k+Missing direct file access protection
#6588Inline Image Upload for BBPress98313k+Missing direct file access protection
#6589Insert Giphy Block9831700Missing direct file access protection
#6590International Telephone Input With Flags And Dial Codes98771k+badly named files
#6591Sharing buttons shortcode for Jetpack9832800Missing direct file access protection
#6592Keep Emoticons as Text9831700Missing direct file access protection
#6593ZZAZZ9882500Missing direct file access protection
#6594ToneDen Shortcode98302k+Missing direct file access protection
#6595Last Viewed Posts by WPBeginner9834500Missing direct file access protection
#6596Layout Grid Block9851200k+Missing direct file access protection
#6597Lazy Load984010k+Missing direct file access protection
#6598Lili Business Banking981801k+Text Domain Mismatch
#6599Link Manager984020k+Missing direct file access protection
#6600List Sub Pages9840400Missing direct file access protection