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 |
|---|---|---|---|---|---|---|---|---|
| #6601 | List Sub Pages | 98 | 4 | 0 | 400 | Missing direct file access protection | ||
| #6602 | Listo | 98 | 4 | 0 | 7k+ | Missing direct file access protection | ||
| #6603 | Logout Clear Cookies | 98 | 3 | 1 | 500 | Missing direct file access protection | ||
| #6604 | Make Filename Lowercase | 98 | 3 | 1 | 1k+ | Missing direct file access protection | ||
| #6605 | MakeITeasy Back To Top | 98 | 3 | 1 | 2k+ | Missing direct file access protection | ||
| #6606 | Material Admin Theme | 98 | 2 | 3 | 1k+ | Missing Version | ||
| #6607 | MB FacetWP Integration | 98 | 2 | 3 | 700 | trademarked term | ||
| #6608 | MB Yoast SEO Integration | 98 | 2 | 3 | 600 | trademarked term | ||
| #6609 | Mime Types Plus | 98 | 1 | 12 | 10k+ | Non-prefixed global variable | ||
| #6610 | Monster Widget | 98 | 3 | 4 | 800 | Non-prefixed hook name | ||
| #6611 | Custom Front Page | 98 | 2 | 2 | 900 | Missing direct file access protection | ||
| #6612 | Multi Device Switcher | 98 | 2 | 9 | 20k+ | Non-prefixed function | ||
| #6613 | Multisite Language Switcher | 98 | 4 | 21 | 4k+ | Dynamic hook name | ||
| #6614 | Native Lazyload | 98 | 2 | 2 | 5k+ | Missing Version | ||
| #6615 | Nested Shortcodes by Outerbridge | 98 | 4 | 0 | 1k+ | Missing direct file access protection | ||
| #6616 | Neve Hooks | 98 | 4 | 0 | 400 | Missing direct file access protection | ||
| #6617 | News Ticker Widget for Elementor | 98 | 2 | 2 | 4k+ | Non-prefixed constant | ||
| #6618 | No Image Link | 98 | 3 | 1 | 1k+ | Missing direct file access protection | ||
| #6619 | Noindex Attachment Pages | 98 | 3 | 1 | 600 | Missing direct file access protection | ||
| #6620 | oEmbed Plus | 98 | 3 | 1 | 4k+ | Missing direct file access protection | ||
| #6621 | External Links in New Window / New Tab | 98 | 2 | 13 | 30k+ | Non-prefixed global variable | ||
| #6622 | OTF Regenerate Thumbnails | 98 | 3 | 1 | 4k+ | Missing direct file access protection | ||
| #6623 | Password Strength for WooCommerce | 98 | 3 | 0 | 1k+ | Missing direct file access protection | ||
| #6624 | Paste as Plain Text | 98 | 2 | 1 | 1k+ | Missing direct file access protection | ||
| #6625 | Star Rating Block for Block Editor | 98 | 4 | 1 | 600 | Missing direct file access protection | ||
| #6626 | Plugin Detective – Troubleshooting Conflicts | 98 | 6 | 3 | 5k+ | Missing direct file access protection | ||
| #6627 | Plugins List | 98 | 3 | 3 | 700 | trademarked term | ||
| #6628 | Popup Block | 98 | 6 | 2 | 700 | Missing direct file access protection | ||
| #6629 | Custom Query Blocks | 98 | 6 | 13 | 700 | Non-prefixed hook name | ||
| #6630 | Preserve Taxonomy Hierarchy | 98 | 2 | 1 | 800 | Missing direct file access protection | ||
| #6631 | Protect schema.org markup in HTML editor | 98 | 3 | 0 | 800 | Missing direct file access protection | ||
| #6632 | WebSub (FKA. PubSubHubbub) | 98 | 5 | 4 | 100k+ | Non-prefixed hook name | ||
| #6633 | QR Block | 98 | 3 | 0 | 500 | Missing direct file access protection | ||
| #6634 | Quicklink for WordPress | 98 | 3 | 2 | 1k+ | trademarked term | ||
| #6635 | Re-Add Text Justify Button | 98 | 3 | 0 | 20k+ | Missing direct file access protection | ||
| #6636 | Really Disable Emojis | 98 | 2 | 2 | 800 | Missing direct file access protection | ||
| #6637 | Really Simple CAPTCHA | 98 | 2 | 2 | 300k+ | Non-prefixed constant | ||
| #6638 | Really Simple Popup | 98 | 2 | 4 | 400 | Missing Version | ||
| #6639 | Relative Image URLs | 98 | 3 | 1 | 1k+ | Missing direct file access protection | ||
| #6640 | Remove Archive Label | 98 | 3 | 1 | 400 | Missing direct file access protection | ||
| #6641 | Remove Author Pages | 98 | 3 | 0 | 3k+ | Missing direct file access protection | ||
| #6642 | Remove Howdy | 98 | 3 | 0 | 700 | Missing direct file access protection | ||
| #6643 | Remove invalid menu items | 98 | 3 | 2 | 1k+ | Missing Version | ||
| #6644 | Remove Orphan Shortcodes | 98 | 3 | 1 | 1k+ | Missing direct file access protection | ||
| #6645 | Responsive Image Maps | 98 | 3 | 1 | 4k+ | Missing direct file access protection | ||
| #6646 | Restore Link Title Field | 98 | 4 | 0 | 3k+ | Missing Arg Domain | ||
| #6647 | Safe SVG | 98 | 7 | 4 | 1m+ | Missing Arg Domain | ||
| #6648 | SameSite Cookies | 98 | 3 | 2 | 700 | Missing direct file access protection | ||
| #6649 | Save with keyboard | 98 | 2 | 2 | 3k+ | Missing direct file access protection | ||
| #6650 | Search shortcode | 98 | 3 | 0 | 900 | Missing direct file access protection |