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 |
|---|---|---|---|---|---|---|---|---|
| #6351 | Image Automatic Height Width | 97 | 6 | 0 | 400 | Missing direct file access protection | ||
| #6352 | Img Title Removal | 97 | 3 | 2 | 1k+ | Missing direct file access protection | ||
| #6353 | instant.page | 97 | 4 | 0 | 3k+ | Missing direct file access protection | ||
| #6354 | jQuery Updater | 97 | 8 | 4 | 20k+ | library core files | ||
| #6355 | Koalendar – Easy Appointment Scheduling & Booking Plugin | 97 | 8 | 3 | 1k+ | wp function not compatible with requires wp | ||
| #6356 | Last Updated Shortcode | 97 | 3 | 4 | 800 | Non-prefixed global variable | ||
| #6357 | LH Dashboard Notes | 97 | 16 | 1 | 500 | Missing Arg Domain | ||
| #6358 | Limit Post Add-On | 97 | 22 | 0 | 400 | wp function not compatible with requires wp | ||
| #6359 | List categories | 97 | 5 | 2 | 5k+ | Missing Arg Domain | ||
| #6360 | Maestro Connector | 97 | 7 | 4 | 500 | Missing direct file access protection | ||
| #6361 | MetalpriceAPI | 97 | 4 | 4 | 500 | Missing direct file access protection | ||
| #6362 | MO Cache | 97 | 3 | 3 | 1k+ | Non-prefixed hook name | ||
| #6363 | Modal Builder Block | 97 | 4 | 2 | 700 | Missing direct file access protection | ||
| #6364 | Nepali Date Converter | 97 | 2 | 25 | 900 | Non-prefixed function | ||
| #6365 | Newpost Catch | 97 | 2 | 15 | 10k+ | Non-prefixed hook name | ||
| #6366 | NiceJob | 97 | 8 | 5 | 700 | Non-prefixed function | ||
| #6367 | No Comments On Pages | 97 | 4 | 0 | 1k+ | Missing direct file access protection | ||
| #6368 | No Right Click Images | 97 | 14 | 13 | 20k+ | wp function not compatible with requires wp | ||
| #6369 | Olark Live Chat | 97 | 3 | 16 | 1k+ | Non-prefixed global variable | ||
| #6370 | Organize Media Folder | 97 | 3 | 35 | 2k+ | Direct Query | ||
| #6371 | Overwrite Uploads | 97 | 3 | 4 | 1k+ | Missing direct file access protection | ||
| #6372 | Page Management Dropdown | 97 | 3 | 3 | 600 | Direct Query | ||
| #6373 | Password bcrypt | 97 | 4 | 1 | 2k+ | Direct Query | ||
| #6374 | Pattern Manager | 97 | 6 | 2 | 400 | Missing direct file access protection | ||
| #6375 | Payment gateway via Teya SecurePay for WooCommerce | 97 | 96 | 2 | 1k+ | Text Domain Mismatch | ||
| #6376 | PHP Compatibility Checker | 97 | 42 | 5 | 200k+ | Text Domain Mismatch | ||
| #6377 | PHP Version | 97 | 4 | 3 | 5k+ | Missing Version | ||
| #6378 | Podlove Web Player | 97 | 8 | 4 | 4k+ | Missing direct file access protection | ||
| #6379 | PowerFolio – Portfolio & Image Gallery for Elementor | 97 | 10 | 12 | 10k+ | Non-prefixed hook name | ||
| #6380 | Post Update Add-On – Gravity Forms | 97 | 44 | 2 | 400 | Non Singular String Literal Domain | ||
| #6381 | Prevent Concurrent Logins | 97 | 2 | 10 | 900 | Non-prefixed function | ||
| #6382 | Rel Nofollow Checkbox | 97 | 9 | 1 | 4k+ | Missing Arg Domain | ||
| #6383 | Relative URL | 97 | 4 | 3 | 3k+ | wp function not compatible with requires wp | ||
| #6384 | Remove Category Word From Title | 97 | 3 | 3 | 500 | Non-prefixed function | ||
| #6385 | Remove IP | 97 | 5 | 0 | 5k+ | Missing direct file access protection | ||
| #6386 | Remove Meta Generators | 97 | 5 | 5 | 1k+ | wp function not compatible with requires wp | ||
| #6387 | Remove Widget Titles | 97 | 5 | 0 | 7k+ | Missing direct file access protection | ||
| #6388 | Astra Customizer Reset | 97 | 7 | 1 | 30k+ | Text Domain Mismatch | ||
| #6389 | Resizable Sidebar for the Gutenberg Block Editor | 97 | 3 | 4 | 2k+ | Missing Version | ||
| #6390 | Responsive Video Embeds | 97 | 3 | 2 | 2k+ | Missing direct file access protection | ||
| #6391 | Retina @2x | 97 | 3 | 3 | 700 | Missing Version | ||
| #6392 | Right Click Disable Orignal | 97 | 4 | 3 | 1k+ | Missing Version | ||
| #6393 | RoleMaster Suite – User Role Editor for E-Commerce, Membership & Admin Panel | 97 | 8 | 2 | 700 | Missing direct file access protection | ||
| #6394 | rus to lat advanced | 97 | 3 | 3 | 7k+ | Deprecated function: seems_utf8 | ||
| #6395 | RV Embed PDF | 97 | 5 | 0 | 900 | Missing direct file access protection | ||
| #6396 | Search & Replace Everything by WPCode – Find and Replace Media, Text, Links, and More | 97 | 5 | 4 | 20k+ | Missing direct file access protection | ||
| #6397 | Search Widget Post Types for Elementor | 97 | 4 | 2 | 600 | Deprecated parameter: load_plugin_textdomain parameter 2 | ||
| #6398 | Sharpen Resized Images | 97 | 4 | 3 | 1k+ | Non-prefixed hook name | ||
| #6399 | Shortcode Empty Paragraph Fix | 97 | 4 | 0 | 800 | Missing direct file access protection | ||
| #6400 | Shortcode Preview Block | 97 | 5 | 3 | 1k+ | Missing Version |