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
#4801Simple Calendar – Advanced Custom Fields67186400Output is not escaped
#4802Simple HTTPS671713400Output is not escaped
#4803Simple Membership Custom Messages674707k+Text Domain Mismatch
#4804WP Forms + Sprout Invoices – Easy Invoice & Quote Submissions674012400Text Domain Mismatch
#4805Text Expander675015600wp function not compatible with requires wp
#4806Theme Check67143620k+Missing Translators Comment
#4807BitPay Gateway for WooCommerce676421400Text Domain Mismatch
#4808WebToffee WooCommerce Product Feeds – Google Shopping, Pinterest, TikTok Ads, & More671782,8992k+Non-prefixed hook name
#4809Widget Contact Form 7672221k+Output is not escaped
#4810WP-Copyright-Protection672455k+wp function not compatible with requires wp
#4811WP Image Zoom67304610k+Non-prefixed global variable
#4812JAMstack Deployments673331k+Short PHP open tag found
#4813WP Post Branches6716124k+Nonce verification recommended
#4814wp-Typography67913320k+Missing direct file access protection
#4815ACF: Yandex Maps Field687310800Text Domain Mismatch
#4816Auto Image Title & Alt68134400Missing direct file access protection
#4817Book Previewer for Woocommerce6823401k+Non-prefixed global variable
#4818Member Swipe for BuddyPress68913500Missing direct file access protection
#4819Category Featured Images68512600Input is not sanitized
#4820Clearout Email Validator – Real-Time Email Verification on WordPress Forms682180600Non-prefixed function
#4821Collapsing Categories682984k+Missing direct file access protection
#4822Controls for Contact Form 7 (Redirects, Analytics & Tracking)6841410k+Missing nonce verification
#4823ConvertBox Auto Embed WordPress plugin6818105k+Missing direct file access protection
#4824Desert Companion6841283720k+Non-prefixed global variable
#4825Exchange Rates Today68910400Non-prefixed function
#4826Expire Sticky Posts681681k+Text Domain Mismatch
#4827Export media with selected content (by DKZR)68101440k+Direct Query
#4828Fatal Error Notify6810126k+Request data is not unslashed
#4829Free Assets Library – Openverse/Pixabay 600+ Million Images6844364k+Text Domain Mismatch
#4830Guestplan Booking Widget684361k+Text Domain Mismatch
#4831Hreflang Manager – Hreflang Implementation for International SEO6821158k+wp function not compatible with requires wp
#4832Mailster Contact Form 76835201k+Text Domain Mismatch
#4833ミエルカヒートマップ タグマネージャー68911800Input is not validated
#4834News Magazine X Core6863305k+Missing Translators Comment
#4835Pinterest Verify Meta Tag68206600Output is not escaped
#4836POS Entegratör – Gurmehub Ödeme Eklentisi681,321691k+Text Domain Mismatch
#4837Hide Title68136900Output is not escaped
#4838Postepay Gateway per Woocommerce683641k+Text Domain Mismatch
#4839Custom Form Builder, Contact Forms, Payment Forms, Surveys, Polls682118900Output is not escaped
#4840Protection Against DDoS682253k+Output is not escaped
#4841Reusable Gutenberg Blocks Widget68249500Output is not escaped
#4842Series685562k+Text Domain Mismatch
#4843SKT Page Builder6815492k+Missing nonce verification
#4844Smartarget – Chat Buttons & Engagement Apps6831111k+Non Singular String Literal Domain
#4845Template List Metabox681410900Missing Arg Domain
#4846Increase Maximum Upload File Size68281440k+Missing Arg Domain
#4847Export and Import Users and Customers6822366260k+Non-prefixed global variable
#4848Video Tab For WooCommerce68713600Missing nonce verification
#4849Product Category Slider for WooCommerce6821104800Non-prefixed hook name
#4850WP and Divi Icons68201562k+wp function not compatible with requires wp