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
#6501Contact Form Clean and Simple98237k+Non-prefixed class
#6502Clean My Archives9840800Missing direct file access protection
#6503Clear Floats Button98312k+Missing direct file access protection
#6504Clone Posts985510k+Missing Arg Domain
#6505MomentoPress for Momento36098231k+Missing Version
#6506Collapsible Categories in the Dashboard9830600Missing direct file access protection
#6507Comment Email Reply9862600Text Domain Mismatch
#6508Comments Shortcode9831900Missing direct file access protection
#6509CookieFirst | GDPR Cookie Consent Banner9850400Missing direct file access protection
#6510Counter Block98421k+Missing direct file access protection
#6511Counter-Hits98421k+Missing direct file access protection
#6512Custom Post Type Editor98422k+Missing direct file access protection
#6513Create And Assign Categories For Pages983110k+Missing direct file access protection
#6514Custom Color Palette for Gutenberg98241k+Discouraged text-domain loading
#6515Datawrapper oEmbed9830800Missing direct file access protection
#6516Date Published Shortcode9831500Missing direct file access protection
#6517ElasticPress Debugging Add-On98210800Non-prefixed hook name
#6518Default Media Uploader View9831600Missing direct file access protection
#6519Disable Autosave9830400Missing direct file access protection
#6520Disable "BIG Image" Threshold983110k+Missing direct file access protection
#6521Disable Block Editor9831800Missing direct file access protection
#6522Disable WordPress Core Update Email98232k+trademarked term
#6523Disable Generate Thumbnails981146k+Non-prefixed global variable
#6524Disable Login Language Selector98401k+Missing direct file access protection
#6525Disable Plugin Autoupdate Emails98336k+trademarked term
#6526Disable Real MIME Check983010k+Missing direct file access protection
#6527Disable Updates for WordPress Core, Plugins and Themes982310k+Missing direct file access protection
#6528Disable Welcome Messages and Tips9830800Missing direct file access protection
#6529Disable Widget Block Editor9831400Missing direct file access protection
#6530Disable All WordPress Updates984610k+trademarked term
#6531Disable XML-RPC Pingback982160k+Missing direct file access protection
#6532DocumentCloud98331k+Missing direct file access protection
#6533Drop Cap Shortcode9822500Missing Version
#6534Duplicate Widgets98613k+Text Domain Mismatch
#6535Easy Access Reusable Blocks9833500Non-prefixed constant
#6536Easy Add Thumbnail98307k+Missing direct file access protection
#6537Easy Hide Login9831220k+Non-prefixed global variable
#6538Map Block98256k+Missing direct file access protection
#6539Easy remove item menu98336k+Discouraged text-domain loading
#6540Easy YouTube Gallery9840500Missing direct file access protection
#6541Eazy Enable Blogroll98422k+Missing Arg Domain
#6542Edit Image Thumbnails Separately9821400Missing direct file access protection
#6543Eleblog – Elementor Blog And Magazine Addons981311k+Missing direct file access protection
#6544Embed Block for GitHub9852400Missing Translators Comment
#6545Enable CORS981026k+Missing direct file access protection
#6546ESTO payment methods98154400wp function not compatible with requires wp
#6547Event Block98511k+Missing direct file access protection
#6548FAQ Block For Gutenberg98354k+trademarked term
#6549Featured Image in Content9831700Missing direct file access protection
#6550Feeds for TikTok (TikTok feed, video, and gallery plugin)985370k+Missing direct file access protection