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
#2201Force Email Login3550800Hidden files included
#2202Force Regenerate Thumbnails351217200k+unlink unlink
#2203Force Reinstall35118342k+Output is not escaped
#2204Friendly Captcha for WordPress35192629k+Output is not escaped
#2205FrontBlocks for Gutenberg/GeneratePress35107500Offloaded Content
#2206Frontend Reset Password358312810k+Text Domain Mismatch
#2207g-FFL Cockpit3518224500Direct Query
#2208Video Gallery – YouTube Gallery, Vimeo, Video Portfolio, Image Portfolio and Image Gallery355019910k+Non-prefixed global variable
#2209GD bbPress Attachments352106k+wp redirect wp redirect
#2210GDPR Compliance & Cookie Consent35251614k+Output is not escaped
#2211Genesis Simple Sidebars3595110k+Nonce verification recommended
#2212GeoTargeting Lite – WordPress Geolocation3566791k+Output is not escaped
#2213Get a Newsletter35138144400Output is not escaped
#2214Glossary35169932k+Non Singular String Literal Domain
#2215GNU Terry Pratchett35211k+Hidden files included
#2216Google Analytics Opt-Out353475k+Output is not escaped
#2217Reviews Block for Google35244351k+Missing Arg Domain
#2218Gravitec.net – Web Push Notifications3547521k+wp function not compatible with requires wp
#2219Gravity Forms: Multiple Form Instances3566700Hidden files included
#2220Gumlet – Image optimization with Resize, Compression, Lazy load, Caching & CDN delivery355345500parse url parse url
#2221Health Check & Troubleshooting35264238300k+Missing Arg Domain
#2222Heartbeat Control35271880k+Missing Arg Domain
#2223Social Comments by Heateor3528535700Unsafe printing function
#2224Help Scout351113400Missing direct file access protection
#2225HookMeUp for WooCommerce35592910k+Output is not escaped
#2226HT Form Widget for Elementor and WPForms35892k+Output is not escaped
#2227HTTP Authentication35236600Output is not escaped
#2228Iframely – WP media embeds, cards and blocks35136432k+Unsafe printing function
#2229Image Slider35192954k+Output is not escaped
#2230Imsanity353229200k+Direct Query
#2231IndieWeb3559600Non-prefixed hook name
#2232Inspiro Starter Sites – 20+ Free Demo Templates for Gutenberg & Elementor35620010k+Non-prefixed global variable
#2233Social Feed Gallery351045280k+Text Domain Mismatch
#2234Instant CSS3525253k+Output is not escaped
#2235Instapage Plugin35220454k+Output is not escaped
#2236Integrate Umami351002k+Hidden files included
#2237IntenseDebate Comments35203114500Output is not escaped
#2238ICIT Weather Widget353588400Output is not escaped
#2239IP Based Login35179146600Output is not escaped
#2240Issuu PDF Sync3515928900Text Domain Mismatch
#2241Japanese font for WordPress(Previously: Japanese Font for TinyMCE)35113710k+Non-prefixed global variable
#2242Jarvis351019500Input is not validated
#2243Static Site Exporter355425500file system operations mkdir
#2244Jetpack VideoPress357102417k+Text Domain Mismatch
#2245JS Categories List Widget3537181k+Non Singular String Literal Domain
#2246JSON Feed (jsonfeed.org)359291k+Non-prefixed global variable
#2247Kadence for WooCommerce and Elementor3539213k+Output is not escaped
#2248Kargo Takip35841423k+Missing nonce verification
#2249Kaya QR Code Generator351934020k+Non Singular String Literal Domain
#2250KBoard 위젯 – 워드프레스 게시판3553323k+Output is not escaped