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 |
|---|---|---|---|---|---|---|---|---|
| #3201 | Enhanced Admin Bar with Codex Search | 39 | 64 | 3 | 1k+ | Missing Arg Domain | ||
| #3202 | Events Manager – Zoom Integration | 39 | 141 | 43 | 700 | Output is not escaped | ||
| #3203 | FaniMani.pl | 39 | 103 | 11 | 600 | Output is not escaped | ||
| #3204 | Faster Image Insert | 39 | 94 | 26 | 2k+ | Output is not escaped | ||
| #3205 | Favorites | 39 | 187 | 123 | 10k+ | Unsafe printing function | ||
| #3206 | Fix Duplicates | 39 | 76 | 73 | 800 | Output is not escaped | ||
| #3207 | Flamix: Bitrix24 and WooCommerce Orders integration | 39 | 81 | 31 | 500 | Output is not escaped | ||
| #3208 | Flex Import | 39 | 15 | 132 | 500 | Non-prefixed global variable | ||
| #3209 | Floating Action Button | 39 | 164 | 69 | 1k+ | Unsafe printing function | ||
| #3210 | Gallery Widget | 39 | 122 | 11 | 500 | Output is not escaped | ||
| #3211 | GF Mollie by Indigo | 39 | 82 | 33 | 900 | Exception output is not escaped | ||
| #3212 | Gift Up Gift Cards for WordPress and WooCommerce | 39 | 94 | 60 | 5k+ | Output is not escaped | ||
| #3213 | Google Calendar Widget | 39 | 82 | 11 | 700 | Output is not escaped | ||
| #3214 | Prisna GWT – Google Website Translator | 39 | 117 | 77 | 8k+ | Text Domain Mismatch | ||
| #3215 | GoSMTP – SMTP for WordPress | 39 | 59 | 42 | 500k+ | Output is not escaped | ||
| #3216 | Graphina – Charts and Graphs For Elementor | 39 | 1,910 | 113 | 10k+ | Text Domain Mismatch | ||
| #3217 | Gravity Slider Fields | 39 | 56 | 36 | 2k+ | Text Domain Mismatch | ||
| #3218 | GS Only PDF Preview | 39 | 46 | 36 | 1k+ | Output is not escaped | ||
| #3219 | Gutenverse News – News Blocks for Blog & Magazine Sites | 39 | 37 | 65 | 800 | Non-prefixed hook name | ||
| #3220 | HD Quiz | 39 | 252 | 82 | 7k+ | Output is not escaped | ||
| #3221 | Hide My WP Lite | 39 | 24 | 62 | 400 | Nonce verification recommended | ||
| #3222 | hpb seo plugin for WordPress | 39 | 15 | 87 | 2k+ | Non-prefixed global variable | ||
| #3223 | HTML5 Cumulus | 39 | 132 | 33 | 1k+ | Output is not escaped | ||
| #3224 | HW Image Widget | 39 | 138 | 41 | 1k+ | Output is not escaped | ||
| #3225 | Idle User Logout | 39 | 96 | 13 | 1k+ | Output is not escaped | ||
| #3226 | If Menu – Visibility control for Menus | 39 | 281 | 63 | 50k+ | Output is not escaped | ||
| #3227 | S2W – Import Shopify to WooCommerce | 39 | 8 | 132 | 3k+ | Request data is not unslashed | ||
| #3228 | Improved Save Button | 39 | 44 | 52 | 4k+ | Missing Translators Comment | ||
| #3229 | Insert Amz Images | 39 | 79 | 44 | 1k+ | Output is not escaped | ||
| #3230 | Insert Html Snippet | 39 | 159 | 205 | 20k+ | Output is not escaped | ||
| #3231 | involve.me – Create Surveys, Quizzes, Calculators & Forms as Embedded Widgets or Pop-ups | 39 | 158 | 32 | 400 | Text Domain Mismatch | ||
| #3232 | JetGridBuilder — Grid Builder for Elementor and Gutenberg | 39 | 414 | 40 | 4k+ | Text Domain Mismatch | ||
| #3233 | JJ NextGen JQuery Carousel | 39 | 122 | 9 | 400 | Output is not escaped | ||
| #3234 | JJ NextGen JQuery Slider | 39 | 221 | 7 | 800 | Output is not escaped | ||
| #3235 | Korea SNS | 39 | 88 | 30 | 4k+ | Unsafe printing function | ||
| #3236 | Leaflet Map | 39 | 59 | 32 | 30k+ | Output is not escaped | ||
| #3237 | LH Add Media From Url | 39 | 42 | 26 | 2k+ | Output is not escaped | ||
| #3238 | Library Viewer | 39 | 65 | 93 | 400 | Non-prefixed hook name | ||
| #3239 | linkPizza-Manager | 39 | 46 | 23 | 700 | Exception output is not escaped | ||
| #3240 | LuckyWP Table of Contents | 39 | 438 | 62 | 100k+ | Output is not escaped | ||
| #3241 | Magazine Blocks – Blog Designer, Magazine & Newspaper Website Builder, Page Builder with Posts Blocks, Post Grid | 39 | 65 | 72 | 6k+ | block api version too low | ||
| #3242 | Mail Subscribe List | 39 | 17 | 94 | 3k+ | Input is not validated | ||
| #3243 | MailChimp Add-On for FormCraft | 39 | 56 | 29 | 800 | curl curl setopt | ||
| #3244 | Manage Enrollment for LearnDash | 39 | 48 | 79 | 400 | Unsafe printing function | ||
| #3245 | Map Categories to Pages | 39 | 48 | 13 | 700 | Output is not escaped | ||
| #3246 | Kikote – Location Picker at Checkout & Google Address AutoFill Plugin for WooCommerce | 39 | 76 | 64 | 1k+ | Missing Translators Comment | ||
| #3247 | Media Sync | 39 | 193 | 7 | 50k+ | Short PHP open tag found | ||
| #3248 | Mega Addons For WPBakery Page Builder | 39 | 1,320 | 154 | 20k+ | Text Domain Mismatch | ||
| #3249 | Meks Easy Photo Feed Widget | 39 | 77 | 27 | 10k+ | Output is not escaped | ||
| #3250 | Menubar | 39 | 171 | 46 | 1k+ | Output is not escaped |