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
#6451WP Maximum Execution Time Exceeded974320k+trademarked term
#6452WP-NoIndex9742400trademarked term
#6453WP-Post-Meta-Revisions9753400Missing direct file access protection
#6454WP Print Friendly9753500trademarked term
#6455WP Responsive Auto Fit Text97116600wp function not compatible with requires wp
#6456WP-RTL97452k+trademarked term
#6457WP Sanitize File Name Plus97351k+trademarked term
#6458WP-Stateless – Gravity Forms Addon9729400Non-prefixed hook name
#6459Smart Coupons For WooCommerce Coupons9735830k+Non-prefixed class
#6460Wufoo Shortcode973310k+Missing direct file access protection
#6461Yoycol Integration for WooCommerce9744400Missing Version
#6462ZIP from Media97416400Non-prefixed global variable
#6463Zone Manager (Zoninator)97522k+Missing direct file access protection
#6464Accessibility Widget by OneTap – Easy One-Click Accessibility Toolbar9841850k+Non-prefixed global variable
#6465Advanced Custom Fields: Unique ID Field98423k+Missing direct file access protection
#6466ActBlue Contributions9823400Missing direct file access protection
#6467Add Custom Header Images9824400Missing direct file access protection
#6468Admin Sticky Sidebar9823800Missing direct file access protection
#6469Admin Toolbar Menus98211k+Missing direct file access protection
#6470Advanced Disable Parent Menu Link9830600Missing direct file access protection
#6471Advanced Image Styles98319k+Missing direct file access protection
#6472Advanced Post Excerpt98222k+Non-prefixed hook name
#6473Ajax Load More for Advanced Custom Fields98312k+Missing direct file access protection
#6474Allow Cyrillic Usernames9830600Missing direct file access protection
#6475Allow ePUB and MOBI formats upload98222k+Missing direct file access protection
#6476Always Use Open Graph with Jetpack9821500Missing direct file access protection
#6477Style Kits for Elementor9821510k+Non-prefixed constant
#6478App for Cloudflare®981011k+wp function not compatible with requires wp
#6479Augmented Reality Viewer – 3D Model Viewer9852500wp function not compatible with requires wp
#6480Auto Copyright Year Updater98303k+Missing direct file access protection
#6481Disable Gutenberg9822600trademarked term
#6482Auto SEO98312500Non-prefixed global variable
#6483Auto Submenu98222k+Missing direct file access protection
#6484Auto Updates98221k+Missing direct file access protection
#6485Automatic image ALT attributes98401k+Missing direct file access protection
#6486Autover9840800Missing direct file access protection
#6487Better REST API Featured Images98412k+Deprecated parameter: load_plugin_textdomain parameter 2
#6488Bit Social – Social Media Auto Poster and Scheduler981016k+wp function not compatible with requires wp
#6489Blocks Export Import – Backup & Move Gutenberg Blocks as JSON982111k+Non-prefixed global variable
#6490Broken Link Checker by AIOSEO – Find & Fix Broken Internal, External & Video Links98115300k+Non-prefixed global variable
#6491Bulglish Permalinks98313k+Missing direct file access protection
#6492Cachebuster98311k+Missing direct file access protection
#6493Callout9831400Missing direct file access protection
#6494Category Archives Block98145900Missing Arg Domain
#6495Category Checklist Tree98305k+Missing direct file access protection
#6496Category and Subcategory List Widget9823700Not In Footer
#6497cbnet Ping Optimizer98301k+Missing direct file access protection
#6498City Dropdown For Woocommerce9863400Text Domain Mismatch
#6499Clariti98311k+Missing direct file access protection
#6500Contact Form Clean and Simple98237k+Non-prefixed class