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
#6151Block Patterns for Food Bloggers962114800Missing direct file access protection
#6152Booktics – Booking Calendar for Appointments and Service Businesses96297700wp function not compatible with requires wp
#6153Bulk Datetime Change963186k+Non-prefixed global variable
#6154Bulk Delete9622630k+slow db query meta key
#6155Button Generator – Easily Create Custom Buttons with Icons and Analytics968685k+Non-prefixed global variable
#6156Carousel Slider Block for Gutenberg96481240k+Text Domain Mismatch
#6157Autopreenchimento de endereço em formulários96511k+Missing direct file access protection
#6158Cleanup HTML96431k+Missing Version
#6159Cookie Wow PDPA Banner96761k+Missing direct file access protection
#6160Custom Fields Permalink 29649500Non-prefixed global variable
#6161Custom Shortcodes96526k+Missing direct file access protection
#6162Customer Reviews Collector for WooCommerce96515k+Missing direct file access protection
#6163TinyMCE Recover9651600Missing direct file access protection
#6164Date Time Picker for WPForms96741k+Text Domain Mismatch
#6165Default Sort Ascend9651500Missing direct file access protection
#6166Disable Admin Bar9651800Missing direct file access protection
#6167Disable / Hide Comment URL9643500Missing direct file access protection
#6168Disable Media Pages9681010k+Missing Translators Comment
#6169Disable WPautop96442k+trademarked term
#6170Display PHP Version966230k+Missing direct file access protection
#6171Doppler Easy Multichannel Marketing enhanced with IA96116600wp function not compatible with requires wp
#6172Easy Footnotes966228k+Non-prefixed global variable
#6173Easy Hide Admin Menu Items9643111k+Text Domain Mismatch
#6174Edit Custom Fields9610192k+Direct Query
#6175Elastic Email Sender96121410k+Text Domain Mismatch
#6176Elegant Blog Themes Demo Importer962213500Text Domain Mismatch
#6177Elements Plus!9611206k+Non-prefixed function
#6178Enable SVG, WebP, and ICO Upload96121610k+Non-prefixed global variable
#6179Expand + Collapse Funk9685800Missing Arg Domain
#6180FancyBox96534k+Not In Footer
#6181Fixed Bottom Menu9615455k+Non-prefixed hook name
#6182Shipping Live Rates for FedEx for WooCommerce964102k+Non-prefixed global variable
#6183Shipping Live Rates for USPS for WooCommerce964112k+Non-prefixed global variable
#6184Force Refresh9615134k+Missing direct file access protection
#6185Fresh Forms for Gravity96763k+Non-prefixed constant
#6186GA Admin Taxonomy Search9672400Missing direct file access protection
#6187Genesis Connect for WooCommerce96451710k+Text Domain Mismatch
#6188German Slugs9660800Missing direct file access protection
#6189Gravity Forms Klaviyo Add-On9628151k+Text Domain Mismatch
#6190GF Upload to Email Attachment9665600error log print r
#6191Gutenberg Gallery Blocks Lightbox96431k+Missing direct file access protection
#6192Gravity Pre-submission Confirmation9652800Missing direct file access protection
#6193Grow for WordPress967510k+trademarked term
#6194Hide Comments Feature96451k+Missing direct file access protection
#6195Hide WordPress Version9654400trademarked term
#6196Home Page Banner for Astra Theme964522k+Text Domain Mismatch
#6197Image Size Selection for Divi96603500Text Domain Mismatch
#6198Kit (formerly ConvertKit) for WPForms9611161k+Non-prefixed global variable
#6199Ketchup Shortcodes9691400wp function not compatible with requires wp
#6200List Pages Shortcode96595k+Non-prefixed hook name