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 |
|---|---|---|---|---|---|---|---|---|
| #6651 | Seed Buddhist Year | 98 | 3 | 1 | 3k+ | Missing direct file access protection | ||
| #6652 | Sharing Image | 98 | 4 | 2 | 600 | Missing Arg Domain | ||
| #6653 | Shortcodes for Elementor | 98 | 5 | 3 | 5k+ | Missing direct file access protection | ||
| #6654 | Shortcode for OpenTable Widget | 98 | 3 | 2 | 400 | Missing direct file access protection | ||
| #6655 | Shortcodes for Divi | 98 | 2 | 3 | 10k+ | Discouraged text-domain loading | ||
| #6656 | Shortcodes in Sidebar | 98 | 4 | 0 | 400 | Missing direct file access protection | ||
| #6657 | Simple Admin Language Change | 98 | 4 | 2 | 10k+ | Missing direct file access protection | ||
| #6658 | Simple WP Retina | 98 | 2 | 6 | 1k+ | trademarked term | ||
| #6659 | Simplebooklet PDF Viewer and Embedder | 98 | 3 | 0 | 700 | Missing direct file access protection | ||
| #6660 | Sociality | 98 | 11 | 17 | 1k+ | Non-prefixed global variable | ||
| #6661 | Star Rating Block | 98 | 4 | 2 | 1k+ | Missing direct file access protection | ||
| #6662 | Stick My Header for Astra | 98 | 2 | 3 | 600 | Non-prefixed global variable | ||
| #6663 | Sticky Header 2020 | 98 | 107 | 2 | 700 | Text Domain Mismatch | ||
| #6664 | Tableberg – Simple Gutenberg Table Block | 98 | 3 | 4 | 3k+ | date date | ||
| #6665 | Tag Pages | 98 | 3 | 0 | 10k+ | Missing direct file access protection | ||
| #6666 | Tainacan Extra View Modes | 98 | 25 | 1 | 400 | Text Domain Mismatch | ||
| #6667 | TinyMCE Advanced Language Pack | 98 | 4 | 0 | 600 | Missing direct file access protection | ||
| #6668 | TinyMCE VisualBlocks | 98 | 3 | 1 | 900 | Missing direct file access protection | ||
| #6669 | Toggles | 98 | 3 | 0 | 2k+ | Missing direct file access protection | ||
| #6670 | TWST Login Block | 98 | 4 | 1 | 1k+ | Missing Translators Comment | ||
| #6671 | UF Health Require Image Alt Tags | 98 | 3 | 1 | 500 | Missing direct file access protection | ||
| #6672 | Unplug Jetpack | 98 | 4 | 0 | 1k+ | Missing direct file access protection | ||
| #6673 | Users Registration Date | 98 | 3 | 0 | 2k+ | Missing direct file access protection | ||
| #6674 | Waves Block | 98 | 4 | 0 | 700 | Missing direct file access protection | ||
| #6675 | Wayfinder | 98 | 2 | 2 | 700 | Non-prefixed function | ||
| #6676 | WebFinger | 98 | 3 | 8 | 1k+ | Non-prefixed function | ||
| #6677 | Which Template | 98 | 4 | 1 | 1k+ | wp function not compatible with requires wp | ||
| #6678 | Widget Areas for LearnDash | 98 | 4 | 1 | 600 | Missing direct file access protection | ||
| #6679 | Align Woo Buttons | 98 | 3 | 6 | 3k+ | Non-prefixed function | ||
| #6680 | Database Reset | 98 | 14 | 3 | 10k+ | Missing direct file access protection | ||
| #6681 | WP About Author | 98 | 3 | 3 | 500 | trademarked term | ||
| #6682 | WP Copy Protect | 98 | 4 | 3 | 1k+ | trademarked term | ||
| #6683 | WP Custom Avatar | 98 | 2 | 5 | 500 | trademarked term | ||
| #6684 | WP Display Header | 98 | 15 | 3 | 7k+ | Text Domain Mismatch | ||
| #6685 | WP Document Revisions | 98 | 7 | 7 | 2k+ | wp function not compatible with requires wp | ||
| #6686 | WP Edit Username | 98 | 1 | 14 | 2k+ | Non-prefixed hook name | ||
| #6687 | WP Last Login | 98 | 2 | 4 | 10k+ | trademarked term | ||
| #6688 | WP Links Page | 98 | 2 | 3 | 3k+ | trademarked term | ||
| #6689 | WP Menu Image | 98 | 2 | 4 | 2k+ | trademarked term | ||
| #6690 | Wp Post Views – WordPress Post views counter | 98 | 3 | 10 | 4k+ | Non-prefixed class | ||
| #6691 | WP Robots Txt | 98 | 2 | 3 | 40k+ | trademarked term | ||
| #6692 | WP Scraper | 98 | 2 | 4 | 2k+ | trademarked term | ||
| #6693 | WP Search Suggest | 98 | 3 | 3 | 500 | trademarked term | ||
| #6694 | WP Snow Effect | 98 | 5 | 4 | 1k+ | Missing direct file access protection | ||
| #6695 | WP Swiper | 98 | 1 | 13 | 5k+ | Non-prefixed constant | ||
| #6696 | WP TinyMCE Tables | 98 | 3 | 3 | 400 | trademarked term | ||
| #6697 | WPB Addons for Elementor – News Ticker, Timeline, Team & More Widgets | 98 | 1 | 17 | 3k+ | Post Not In exclude | ||
| #6698 | Show IDs by DraftPress | 98 | 2 | 3 | 10k+ | Missing direct file access protection | ||
| #6699 | Yumpu E-Paper publishing | 98 | 2 | 2 | 1k+ | Missing direct file access protection | ||
| #6700 | Zenchef widget integration | 98 | 18 | 0 | 2k+ | Missing direct file access protection |