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 |
|---|---|---|---|---|---|---|---|---|
| #6051 | Widget Instance | 94 | 7 | 11 | 500 | Non-prefixed global variable | ||
| #6052 | MyParcel | 94 | 2 | 84 | 8k+ | Non-prefixed global variable | ||
| #6053 | Novalnet Payment Gateway for WooCommerce | 94 | 4 | 58 | 1k+ | Non-prefixed class | ||
| #6054 | WP Plugin Manager – Deactivate plugins per page | 94 | 18 | 11 | 3k+ | Missing direct file access protection | ||
| #6055 | WP Typograph Lite | 94 | 8 | 4 | 1k+ | trademarked term | ||
| #6056 | WP Sync for Notion – Notion to WordPress | 94 | 14 | 47 | 1k+ | Non-prefixed hook name | ||
| #6057 | XO Security | 94 | 5 | 3 | 30k+ | wp function not compatible with requires wp | ||
| #6058 | Zotabox – 20+ Promotional Sales tools to boost your subscribers and sales | 94 | 12 | 8 | 500 | wp function not compatible with requires wp | ||
| #6059 | Sign In Scheduling Online Appointment Booking System | 95 | 8 | 2 | 800 | No Explicit Version | ||
| #6060 | Accessibility by AudioEye | 95 | 17 | 16 | 2k+ | Non-prefixed global variable | ||
| #6061 | Pulsating Chat Button | 95 | 29 | 3 | 3k+ | wp function not compatible with requires wp | ||
| #6062 | Art WooCommerce Order One Click | 95 | 14 | 40 | 4k+ | Non-prefixed global variable | ||
| #6063 | Astrology | 95 | 7 | 221 | 600 | Non-prefixed global variable | ||
| #6064 | AWSM Team – Team Showcase Plugin | 95 | 7 | 34 | 3k+ | Non-prefixed global variable | ||
| #6065 | Azigen | 95 | 12 | 0 | 1k+ | Missing Arg Domain | ||
| #6066 | BBSpoiler | 95 | 5 | 7 | 4k+ | Missing Version | ||
| #6067 | Better Block Editor (BBE) | 95 | 4 | 53 | 5k+ | Non-prefixed global variable | ||
| #6068 | Booster Pack for Divi | 95 | 179 | 2 | 500 | Text Domain Mismatch | ||
| #6069 | Bulk Media Register | 95 | 8 | 35 | 8k+ | Non-prefixed hook name | ||
| #6070 | Clicky by Yoast | 95 | 10 | 7 | 4k+ | Missing direct file access protection | ||
| #6071 | Custom Login Page Customizer | 95 | 3 | 55 | 50k+ | Non-prefixed global variable | ||
| #6072 | Comment Validation | 95 | 8 | 5 | 700 | Missing Version | ||
| #6073 | Complianz – Terms and Conditions | 95 | 13 | 26 | 300k+ | Non-prefixed global variable | ||
| #6074 | Gravity Forms ConvertKit Add-On | 95 | 65 | 11 | 700 | Text Domain Mismatch | ||
| #6075 | Customify | 95 | 1 | 101 | 10k+ | Non-prefixed global variable | ||
| #6076 | Date counter | 95 | 12 | 2 | 1k+ | Missing direct file access protection | ||
| #6077 | Custom Post Carousels with Owl | 95 | 3 | 27 | 2k+ | Non-prefixed hook name | ||
| #6078 | de_DE | 95 | 16 | 1 | 1k+ | wp function not compatible with requires wp | ||
| #6079 | Disable User Gravatar | 95 | 14 | 2 | 3k+ | wp function not compatible with requires wp | ||
| #6080 | Dokan Menu Hider | 95 | 8 | 2 | 500 | Text Domain Mismatch | ||
| #6081 | Email Log | 95 | 5 | 53 | 80k+ | Non-prefixed hook name | ||
| #6082 | Fluid Player | 95 | 7 | 2 | 400 | Missing direct file access protection | ||
| #6083 | Functionality | 95 | 6 | 2 | 1k+ | date date | ||
| #6084 | Ghost Kit – Page Builder Blocks, Motion Effects & Extensions | 95 | 17 | 60 | 7k+ | Non-prefixed hook name | ||
| #6085 | Hash Link Scroll Offset | 95 | 8 | 4 | 1k+ | Text Domain Mismatch | ||
| #6086 | Htaccess File Editor – Easily Edit, Backup, Restore .htaccess file | 95 | 11 | 15 | 9k+ | Non-prefixed global variable | ||
| #6087 | Image Rotation Repair | 95 | 4 | 5 | 7k+ | Deprecated function: _rotate_image_resource | ||
| #6088 | Increase Maximum Upload File Size | 95 | 6 | 3 | 500 | Missing direct file access protection | ||
| #6089 | jQuery Image Lazy Load WP | 95 | 7 | 4 | 800 | Not Allowed | ||
| #6090 | Kattene | 95 | 7 | 3 | 1k+ | date date | ||
| #6091 | Language Switcher for Transposh | 95 | 22 | 68 | 1k+ | Non-prefixed global variable | ||
| #6092 | Lemmony Companion | 95 | 13 | 5 | 2k+ | block api version too low | ||
| #6093 | Liveblog | 95 | 22 | 34 | 1k+ | Non-prefixed global variable | ||
| #6094 | Live Chat Plugin for WooCommerce – LiveChat | 95 | 62 | 10 | 1k+ | Text Domain Mismatch | ||
| #6095 | Meta Box | 95 | 12 | 16 | 500k+ | Non-prefixed hook name | ||
| #6096 | MilesWeb Tools | 95 | 4 | 49 | 10k+ | Non-prefixed global variable | ||
| #6097 | MotoPress Hotel Booking for Divi | 95 | 22 | 11 | 1k+ | Missing direct file access protection | ||
| #6098 | Next Page, Not Next Post | 95 | 12 | 0 | 1k+ | wp function not compatible with requires wp | ||
| #6099 | No category parents | 95 | 5 | 4 | 6k+ | Missing direct file access protection | ||
| #6100 | StatCounter – Free Real Time Visitor Stats | 95 | 41 | 10 | 70k+ | wp function not compatible with requires wp |