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 |
|---|---|---|---|---|---|---|---|---|
| #6751 | Say What? | 99 | 3 | 2 | 40k+ | Missing direct file access protection | ||
| #6752 | Simple Table Manager | 99 | 2 | 2 | 400 | Discouraged text-domain loading | ||
| #6753 | Simple Ticker | 99 | 1 | 7 | 500 | Non-prefixed global variable | ||
| #6754 | Simply Disable Password Reset | 99 | 2 | 0 | 700 | Missing direct file access protection | ||
| #6755 | Snow Monkey Editor | 99 | 2 | 3 | 30k+ | Non-prefixed global variable | ||
| #6756 | SO Page Builder Animate | 99 | 2 | 0 | 4k+ | Missing direct file access protection | ||
| #6757 | Specia Companion | 99 | 7 | 0 | 4k+ | Missing direct file access protection | ||
| #6758 | Stop Media Comment Spamming | 99 | 2 | 0 | 800 | Missing direct file access protection | ||
| #6759 | Super block slider – Image & content slider | 99 | 1 | 2 | 9k+ | Missing direct file access protection | ||
| #6760 | Super List Block | 99 | 3 | 0 | 800 | Missing direct file access protection | ||
| #6761 | Syntax-highlighting Code Block (with Server-side Rendering) | 99 | 1 | 1 | 1k+ | Missing direct file access protection | ||
| #6762 | Thumbnail Upscale | 99 | 2 | 0 | 3k+ | Missing direct file access protection | ||
| #6763 | TicketSource Ticket Shop | 99 | 3 | 0 | 800 | Missing direct file access protection | ||
| #6764 | Very Simple Google Maps | 99 | 2 | 0 | 3k+ | Missing direct file access protection | ||
| #6765 | Voice Search | 99 | 2 | 1 | 600 | Missing direct file access protection | ||
| #6766 | Widget Post Slider | 99 | 2 | 0 | 1k+ | Missing direct file access protection | ||
| #6767 | X Addons for Elementor | 99 | 2 | 0 | 900 | Missing direct file access protection | ||
| #6768 | Playlist Player for YouTube | 99 | 3 | 1 | 1k+ | Missing direct file access protection | ||
| #6769 | ZoloBlocks – Advanced Gutenberg Blocks, Website Builder & Page Design Toolkit | 99 | 3 | 2 | 1k+ | Missing direct file access protection | ||
| #6770 | Automatic Cache Flusher for W3 Total Cache | 100 | 1 | 0 | 4k+ | Missing direct file access protection | ||
| #6771 | Bookmark Card | 100 | 1 | 0 | 700 | Missing direct file access protection | ||
| #6772 | Definitely allow mobile zooming | 100 | 1 | 0 | 7k+ | Missing direct file access protection | ||
| #6773 | Disable Emojis (GDPR friendly) | 100 | 1 | 0 | 60k+ | Missing direct file access protection | ||
| #6774 | Disable XML-RPC | 100 | 1 | 0 | 200k+ | Missing direct file access protection | ||
| #6775 | Generate Child Theme | 100 | 1 | 0 | 9k+ | Missing direct file access protection | ||
| #6776 | Hyperlink Group Block | 100 | 1 | 0 | 7k+ | Missing direct file access protection | ||
| #6777 | Makeiteasy Slider | 100 | 1 | 0 | 1k+ | Missing direct file access protection | ||
| #6778 | Media Trash Button | 100 | 1 | 0 | 400 | Missing direct file access protection | ||
| #6779 | Nelio Content – Editorial Calendar & Social Media Auto-Posting | 100 | 1 | 0 | 4k+ | Missing direct file access protection | ||
| #6780 | Press Release Distribution | 100 | 1 | 0 | 700 | Missing direct file access protection | ||
| #6781 | Pushly | 100 | 1 | 0 | 900 | Missing direct file access protection | ||
| #6782 | Shortcode Redirect | 100 | 1 | 0 | 10k+ | Missing direct file access protection | ||
| #6783 | Splide Carousel Block | 100 | 1 | 0 | 3k+ | Missing direct file access protection | ||
| #6784 | Unique Title Checker | 100 | 1 | 0 | 1k+ | Missing direct file access protection |