missing_direct_file_access_protection
Missing direct file access protection
A PHP file in the plugin can be loaded directly instead of through WordPress.
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.
References
Affected Plugins
| Rank | Plugin | Score | Errors | Warnings | Installs | Added | Updated | Top Issue |
|---|---|---|---|---|---|---|---|---|
| #6101 | Open Graph | 95 | 74 | 8 | 10k+ | wp function not compatible with requires wp | ||
| #6102 | PayHere Payment Gateway | 95 | 6 | 8 | 2k+ | Non-prefixed class | ||
| #6103 | PDF Viewer Block for Gutenberg | 95 | 39 | 3 | 10k+ | badly named files | ||
| #6104 | Post Lockdown | 95 | 5 | 3 | 1k+ | Missing direct file access protection | ||
| #6105 | Postname Permalink Auto Redirect | 95 | 2 | 3 | 600 | Missing direct file access protection | ||
| #6106 | Posts in Page | 95 | 10 | 12 | 10k+ | date date | ||
| #6107 | Preenche endereço CEP para Woocommerce | 95 | 5 | 5 | 1k+ | Missing Version | ||
| #6108 | Quick remove menu item | 95 | 7 | 3 | 3k+ | Missing Version | ||
| #6109 | Seriously Simple Speakers | 95 | 19 | 13 | 1k+ | Missing Translators Comment | ||
| #6110 | ShortBuild | 95 | 26 | 4 | 1k+ | Missing direct file access protection | ||
| #6111 | Simple No Comments | 95 | 7 | 8 | 1k+ | Direct Query | ||
| #6112 | Simple Pull Quote | 95 | 18 | 2 | 1k+ | wp function not compatible with requires wp | ||
| #6113 | Smart Custom Fields | 95 | 8 | 28 | 50k+ | Dynamic hook name | ||
| #6114 | Spreaker Shortcode | 95 | 23 | 3 | 4k+ | Text Domain Mismatch | ||
| #6115 | Supreme Maps | 95 | 38 | 15 | 2k+ | Text Domain Mismatch | ||
| #6116 | Table of Contents Plus | 95 | 29 | 9 | 200k+ | wp function not compatible with requires wp | ||
| #6117 | Timeline Module for Beaver Builder | 95 | 217 | 29 | 2k+ | Text Domain Mismatch | ||
| #6118 | TinyMCE Table | 95 | 6 | 1 | 700 | Missing direct file access protection | ||
| #6119 | Simla.com | 95 | 22 | 58 | 400 | Non-prefixed class | ||
| #6120 | WP API Yoast SEO | 95 | 8 | 4 | 400 | trademarked term | ||
| #6121 | WP Approve User | 95 | 20 | 11 | 3k+ | Text Domain Mismatch | ||
| #6122 | SNY Auto Featured Image | 95 | 41 | 5 | 1k+ | Text Domain Mismatch | ||
| #6123 | WP Calameo | 95 | 16 | 3 | 3k+ | wp function not compatible with requires wp | ||
| #6124 | WP HTTP Compression | 95 | 5 | 6 | 500 | trademarked term | ||
| #6125 | LiveChat – Live Chat Plugin for WP Websites | 95 | 62 | 9 | 10k+ | Text Domain Mismatch | ||
| #6126 | WPGlobus | 95 | 3 | 83 | 9k+ | Non-prefixed global variable | ||
| #6127 | WPHindi – Type in Hindi in WordPress | 95 | 7 | 9 | 1k+ | Not In Footer | ||
| #6128 | WP Telegram (Auto Post and Notifications) | 95 | 8 | 15 | 30k+ | Non-prefixed function | ||
| #6129 | WP Telegram Login & Register | 95 | 11 | 21 | 1k+ | Non-prefixed global variable | ||
| #6130 | WP Telegram Widget and Join Link | 95 | 13 | 18 | 4k+ | Missing direct file access protection | ||
| #6131 | Yoast Test Helper | 95 | 2 | 43 | 60k+ | Direct Query | ||
| #6132 | ACF to WP-API | 96 | 11 | 5 | 400 | wp function not compatible with requires wp | ||
| #6133 | WebberZone Snippetz – Header, Body and Footer manager | 96 | 1 | 53 | 2k+ | Dynamic hook name | ||
| #6134 | Addonify – Compare Products For WooCommerce | 96 | 16 | 25 | 1k+ | Non-prefixed global variable | ||
| #6135 | Addonify – Quick View For WooCommerce | 96 | 15 | 21 | 1k+ | Non-prefixed global variable | ||
| #6136 | Directorist AddonsKit for Elementor | 96 | 4 | 33 | 10k+ | Non-prefixed global variable | ||
| #6137 | Admin Bar Position | 96 | 5 | 3 | 6k+ | Missing Version | ||
| #6138 | Admin Notices Manager | 96 | 70 | 3 | 10k+ | Missing Arg Domain | ||
| #6139 | Admin Page Spider | 96 | 10 | 27 | 1k+ | Non-prefixed global variable | ||
| #6140 | Portfolio Grid – Filterable Gallery, Grid & Slider Showcase | 96 | 3 | 50 | 900 | Non-prefixed function | ||
| #6141 | AI Bud – AI Content Generator, AI Chatbot, ChatGPT, Gemini, GPT-4o | 96 | 5 | 54 | 2k+ | Non-prefixed global variable | ||
| #6142 | Allow Numeric Slugs | 96 | 5 | 2 | 900 | Direct Query | ||
| #6143 | WP Offload Media Lite for Amazon S3, DigitalOcean Spaces, and Google Cloud Storage | 96 | 8 | 12 | 30k+ | Missing direct file access protection | ||
| #6144 | Amelia Calendar Essential Shortcodes | 96 | 2 | 9 | 500 | Not In Footer | ||
| #6145 | Astra Hooks | 96 | 9 | 0 | 20k+ | Missing direct file access protection | ||
| #6146 | Auto Delete Applications – Add-on for WP Job Openings | 96 | 19 | 14 | 1k+ | Text Domain Mismatch | ||
| #6147 | AutoCEP | 96 | 7 | 8 | 1k+ | error log error log | ||
| #6148 | Bit SMTP – Easy SMTP Solution with Email Logs | 96 | 6 | 13 | 2k+ | Missing Version | ||
| #6149 | Blank | 96 | 6 | 0 | 900 | Missing direct file access protection | ||
| #6150 | Blank Slate | 96 | 8 | 3 | 10k+ | Missing direct file access protection |