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 |
|---|---|---|---|---|---|---|---|---|
| #1001 | SureDash – Community, Courses & Member Dashboard | 25 | 422 | 808 | 1k+ | Non-prefixed global variable | ||
| #1002 | OttoKit: All-in-One Automation Platform | 25 | 1,558 | 1,825 | 90k+ | Missing direct file access protection | ||
| #1003 | Survey Maker by AYS | 25 | 567 | 2,397 | 6k+ | Non-prefixed global variable | ||
| #1004 | TablePress – Tables in WordPress made easy | 25 | 847 | 2,174 | 600k+ | Non-prefixed global variable | ||
| #1005 | Tamara Checkout | 25 | 601 | 228 | 2k+ | Exception output is not escaped | ||
| #1006 | Taskbuilder – Project Management & Task Management Tool With Kanban Board | 25 | 127 | 4,332 | 800 | Non-prefixed global variable | ||
| #1007 | Tax Exemption for WooCommerce | 25 | 552 | 1,402 | 700 | Non-prefixed global variable | ||
| #1008 | TemplateSpare – 1000+ WordPress Starter Templates & Full Site Migration Tool | 1-Click Import/Export & No-Code Builder | 25 | 705 | 1,587 | 10k+ | Non-prefixed global variable | ||
| #1009 | Themify Event Post | 25 | 397 | 143 | 3k+ | Output is not escaped | ||
| #1010 | Timeline Express | 25 | 531 | 147 | 9k+ | Text Domain Mismatch | ||
| #1011 | Toocheke Companion | 25 | 429 | 1,227 | 1k+ | Non-prefixed global variable | ||
| #1012 | Travelly – Tour & Travel Booking Manager for WooCommerce | Tour & Hotel Booking Plugin | 25 | 173 | 726 | 1k+ | Non-prefixed global variable | ||
| #1013 | Tourfic – AI Powered Travel Booking, Hotel Booking & Car Rental WordPress Plugin | 25 | 119 | 2,704 | 2k+ | Non-prefixed global variable | ||
| #1014 | TrackShip for WooCommerce | 25 | 405 | 954 | 6k+ | Non-prefixed global variable | ||
| #1015 | TranslatePress – Translate Multilingual sites with AI Translation | 25 | 499 | 1,639 | 400k+ | Non-prefixed hook name | ||
| #1016 | Spectra Legacy – Gutenberg Blocks | 25 | 253 | 3,226 | 1m+ | Non-prefixed global variable | ||
| #1017 | Ultimate Blocks – 25+ Gutenberg Blocks for Block Editor | 25 | 691 | 1,581 | 50k+ | Non-prefixed global variable | ||
| #1018 | Ultimate Bootstrap Elements for Elementor | 25 | 6,326 | 122 | 6k+ | Text Domain Mismatch | ||
| #1019 | Social Media Share Buttons & Social Sharing Icons | 25 | 2,433 | 1,383 | 100k+ | Unsafe printing function | ||
| #1020 | Social Share Icons & Social Share Buttons | 25 | 2,365 | 1,357 | 10k+ | Output is not escaped | ||
| #1021 | Vayu Blocks – Website Builder for the Gutenberg Block Editor | 25 | 174 | 233 | 1k+ | Text Domain Mismatch | ||
| #1022 | VikAppointments Services Booking Calendar | 25 | 9,753 | 5,207 | 500 | Output is not escaped | ||
| #1023 | VikBooking Hotel Booking Engine & PMS | 25 | 13,251 | 8,316 | 8k+ | Output is not escaped | ||
| #1024 | VikRentCar Car Rental Management System | 25 | 5,537 | 5,048 | 4k+ | Non-prefixed global variable | ||
| #1025 | VikRestaurants Table Reservations and Take-Away | 25 | 11,644 | 4,932 | 600 | Output is not escaped | ||
| #1026 | 3D viewer by Visody | 25 | 832 | 1,322 | 1k+ | Non-prefixed global variable | ||
| #1027 | WC Disable Zoom / Lightbox features | 25 | 529 | 1,297 | 700 | Non-prefixed global variable | ||
| #1028 | Product Customer List for WooCommerce | 25 | 610 | 1,334 | 9k+ | Non-prefixed global variable | ||
| #1029 | Webcomic | 25 | 593 | 308 | 600 | Output is not escaped | ||
| #1030 | weDocs: AI Powered Knowledge Base, Docs, Documentation, Wiki & AI Chatbot | 25 | 279 | 518 | 4k+ | Non-prefixed global variable | ||
| #1031 | weForms – Easy Drag & Drop Contact Form Builder For WordPress | 25 | 916 | 450 | 10k+ | Output is not escaped | ||
| #1032 | Advanced Shipment Tracking for WooCommerce | 25 | 499 | 704 | 60k+ | Non-prefixed global variable | ||
| #1033 | Secure Gateway for Authorize.net and WooCommerce by Pledged Plugins | 25 | 907 | 1,418 | 10k+ | Non-prefixed global variable | ||
| #1034 | Bulk Edit Products for WooCommerce – WP Sheet Editor | 25 | 957 | 968 | 10k+ | Text Domain Mismatch | ||
| #1035 | Bulk Edit Coupons for WooCommerce – WP Sheet Editor | 25 | 1,022 | 982 | 500 | Text Domain Mismatch | ||
| #1036 | WFatture for WooCommerce Fattureincloud | 25 | 229 | 774 | 800 | Non-prefixed global variable | ||
| #1037 | XT Floating Cart for WooCommerce | 25 | 1,232 | 1,985 | 4k+ | Non-prefixed global variable | ||
| #1038 | PDF Builder for WooCommerce. Create invoices,packing slips and more | 25 | 372 | 503 | 2k+ | Non-prefixed global variable | ||
| #1039 | Product Table for WooCommerce | 25 | 183 | 896 | 5k+ | Non-prefixed global variable | ||
| #1040 | Pay with Vipps and MobilePay for WooCommerce | 25 | 846 | 514 | 5k+ | Output is not escaped | ||
| #1041 | Wordfence Login Security | 25 | 248 | 418 | 60k+ | Output is not escaped | ||
| #1042 | WordPress Importer | 25 | 238 | 110 | 2m+ | Output is not escaped | ||
| #1043 | WP 2FA – Two-factor authentication for WordPress | 25 | 283 | 716 | 100k+ | Non-prefixed global variable | ||
| #1044 | WP Airbnb Review Slider | 25 | 325 | 646 | 1k+ | Non-prefixed global variable | ||
| #1045 | Super Page Cache – Cloudflare Cache, Page Speed & Core Web Vitals | 25 | 143 | 357 | 60k+ | Input is not sanitized | ||
| #1046 | Comments Extra Fields For Post,Pages and CPT | 25 | 577 | 418 | 500 | Text Domain Mismatch | ||
| #1047 | WP Coupons and Deals – WordPress Coupon Plugin | 25 | 914 | 1,460 | 1k+ | Non-prefixed global variable | ||
| #1048 | WP-DownloadManager | 25 | 607 | 508 | 3k+ | Unsafe printing function | ||
| #1049 | WP Review Slider | 25 | 1,186 | 2,279 | 6k+ | Non-prefixed global variable | ||
| #1050 | WP Go Maps – Google Map, OpenStreetMap, Leaflet Map | 25 | 4,996 | 1,008 | 300k+ | Unsafe printing function |