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 |
|---|---|---|---|---|---|---|---|---|
| #6701 | Accessibility Tool Kit: WP Accessibility checker plugin for WCAG, Section 508, ADA, EAA Compliance | 99 | 1 | 4 | 1k+ | trademarked term | ||
| #6702 | Add From Server Reloaded | 99 | 2 | 1 | 3k+ | Missing direct file access protection | ||
| #6703 | AntiVirus | 99 | 2 | 1 | 30k+ | Missing direct file access protection | ||
| #6704 | Audio Album | 99 | 2 | 1 | 4k+ | Discouraged text-domain loading | ||
| #6705 | Auto Block Recovery | 99 | 1 | 1 | 600 | Missing direct file access protection | ||
| #6706 | Auto Hide Admin Bar | 99 | 2 | 0 | 4k+ | Missing direct file access protection | ||
| #6707 | Enhanced Responsive Images | 99 | 1 | 2 | 50k+ | Missing direct file access protection | ||
| #6708 | BEA – Sanitize Filename | 99 | 2 | 0 | 1k+ | Missing direct file access protection | ||
| #6709 | Better Aria Label Support | 99 | 3 | 0 | 5k+ | Missing direct file access protection | ||
| #6710 | Bring Back the Get Shortlink Button | 99 | 2 | 0 | 1k+ | Missing direct file access protection | ||
| #6711 | CBX Map for Google Map & OpenStreetMap | 99 | 2 | 0 | 900 | Missing direct file access protection | ||
| #6712 | SMTP for Contact Form 7 | 99 | 5 | 0 | 1k+ | Missing direct file access protection | ||
| #6713 | Classic Menus for Block Themes | 99 | 2 | 0 | 500 | Missing direct file access protection | ||
| #6714 | Columns | 99 | 2 | 1 | 3k+ | Missing Version | ||
| #6715 | Pay With MetaMask For WooCommerce – Cryptocurrency Payment Gateway | 99 | 3 | 4 | 600 | Missing direct file access protection | ||
| #6716 | CSS Class Manager – An advanced autocomplete additional css class control for your blocks | 99 | 1 | 2 | 400 | Discouraged text-domain loading | ||
| #6717 | Default Featured Image | 99 | 2 | 2 | 60k+ | Missing direct file access protection | ||
| #6718 | Disable Embeds | 99 | 2 | 0 | 10k+ | Missing direct file access protection | ||
| #6719 | Disable Login Language Switcher | 99 | 2 | 0 | 1k+ | Missing direct file access protection | ||
| #6720 | Display Featured Image In Post List | 99 | 2 | 0 | 3k+ | Missing direct file access protection | ||
| #6721 | Email Address Obfuscation | 99 | 3 | 0 | 2k+ | wp function not compatible with requires wp | ||
| #6722 | CanadaHelps Embedded Donation Form | 99 | 2 | 0 | 400 | Missing direct file access protection | ||
| #6723 | Event Single Page Builder For The Events Calendar | 99 | 1 | 2 | 6k+ | Non-prefixed class | ||
| #6724 | Button Plus for Elementor | 99 | 2 | 1 | 1k+ | Missing direct file access protection | ||
| #6725 | Featured Image | 99 | 2 | 0 | 1k+ | Missing direct file access protection | ||
| #6726 | Filter for Divi | 99 | 2 | 0 | 2k+ | Missing direct file access protection | ||
| #6727 | Generate Security.txt | 99 | 1 | 5 | 400 | Non-prefixed class | ||
| #6728 | Image Title Remove | 99 | 2 | 0 | 1k+ | Missing direct file access protection | ||
| #6729 | Inline Spoilers | 99 | 2 | 1 | 1k+ | Missing direct file access protection | ||
| #6730 | Insert Special Characters | 99 | 3 | 0 | 3k+ | Missing direct file access protection | ||
| #6731 | jAlbum Bridge | 99 | 1 | 6 | 500 | Not In Footer | ||
| #6732 | Kitstarter | 99 | 2 | 0 | 400 | Missing direct file access protection | ||
| #6733 | Language Fallback | 99 | 2 | 1 | 5k+ | Missing direct file access protection | ||
| #6734 | Light Modal Block | 99 | 1 | 1 | 2k+ | Missing direct file access protection | ||
| #6735 | Link Shortner | 99 | 2 | 0 | 700 | Missing direct file access protection | ||
| #6736 | MakeITeasy Popup | 99 | 3 | 0 | 1k+ | Missing direct file access protection | ||
| #6737 | Marquee Block | 99 | 2 | 0 | 1k+ | Missing direct file access protection | ||
| #6738 | Masks Form Fields | 99 | 2 | 0 | 9k+ | Missing direct file access protection | ||
| #6739 | Nelio Popups | 99 | 5 | 0 | 900 | Missing direct file access protection | ||
| #6740 | NEX-Forms ADD ON – Form Themes | 99 | 2 | 0 | 1k+ | Missing direct file access protection | ||
| #6741 | NodeInfo(2) | 99 | 1 | 1 | 900 | Missing direct file access protection | ||
| #6742 | Ogp Plus | 99 | 1 | 6 | 600 | Non-prefixed global variable | ||
| #6743 | Validate Audio Attribution | 99 | 2 | 0 | 900 | Missing direct file access protection | ||
| #6744 | Post Type Transfer | 99 | 4 | 4 | 3k+ | Missing direct file access protection | ||
| #6745 | Printify for WooCommerce | 99 | 2 | 3 | 10k+ | Missing direct file access protection | ||
| #6746 | Product categories search admin for woocommerce | 99 | 3 | 1 | 400 | Missing direct file access protection | ||
| #6747 | Protect Uploads | 99 | 2 | 1 | 30k+ | Missing direct file access protection | ||
| #6748 | PVB Contact Form 7 Calculator | 99 | 4 | 3 | 600 | Missing direct file access protection | ||
| #6749 | Remove Admin Bar logo | 99 | 2 | 0 | 1k+ | Missing direct file access protection | ||
| #6750 | Remove Protected In Title | 99 | 2 | 0 | 1k+ | Missing direct file access protection |