missing_direct_file_access_protection

Missing direct file access protection

A PHP file in the plugin can be loaded directly instead of through WordPress.

medium weight

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.

Affected Plugins

RankPluginScoreErrorsWarningsInstallsAddedUpdatedTop Issue
#3201Enhanced Admin Bar with Codex Search396431k+Missing Arg Domain
#3202Events Manager – Zoom Integration3914143700Output is not escaped
#3203FaniMani.pl3910311600Output is not escaped
#3204Faster Image Insert3994262k+Output is not escaped
#3205Favorites3918712310k+Unsafe printing function
#3206Fix Duplicates397673800Output is not escaped
#3207Flamix: Bitrix24 and WooCommerce Orders integration398131500Output is not escaped
#3208Flex Import3915132500Non-prefixed global variable
#3209Floating Action Button39164691k+Unsafe printing function
#3210Gallery Widget3912211500Output is not escaped
#3211GF Mollie by Indigo398233900Exception output is not escaped
#3212Gift Up Gift Cards for WordPress and WooCommerce3994605k+Output is not escaped
#3213Google Calendar Widget398211700Output is not escaped
#3214Prisna GWT – Google Website Translator39117778k+Text Domain Mismatch
#3215GoSMTP – SMTP for WordPress395942500k+Output is not escaped
#3216Graphina – Charts and Graphs For Elementor391,91011310k+Text Domain Mismatch
#3217Gravity Slider Fields3956362k+Text Domain Mismatch
#3218GS Only PDF Preview3946361k+Output is not escaped
#3219Gutenverse News – News Blocks for Blog & Magazine Sites393765800Non-prefixed hook name
#3220HD Quiz39252827k+Output is not escaped
#3221Hide My WP Lite392462400Nonce verification recommended
#3222hpb seo plugin for WordPress3915872k+Non-prefixed global variable
#3223HTML5 Cumulus39132331k+Output is not escaped
#3224HW Image Widget39138411k+Output is not escaped
#3225Idle User Logout3996131k+Output is not escaped
#3226If Menu – Visibility control for Menus392816350k+Output is not escaped
#3227S2W – Import Shopify to WooCommerce3981323k+Request data is not unslashed
#3228Improved Save Button3944524k+Missing Translators Comment
#3229Insert Amz Images3979441k+Output is not escaped
#3230Insert Html Snippet3915920520k+Output is not escaped
#3231involve.me – Create Surveys, Quizzes, Calculators & Forms as Embedded Widgets or Pop-ups3915832400Text Domain Mismatch
#3232JetGridBuilder — Grid Builder for Elementor and Gutenberg39414404k+Text Domain Mismatch
#3233JJ NextGen JQuery Carousel391229400Output is not escaped
#3234JJ NextGen JQuery Slider392217800Output is not escaped
#3235Korea SNS3988304k+Unsafe printing function
#3236Leaflet Map39593230k+Output is not escaped
#3237LH Add Media From Url3942262k+Output is not escaped
#3238Library Viewer396593400Non-prefixed hook name
#3239linkPizza-Manager394623700Exception output is not escaped
#3240LuckyWP Table of Contents3943862100k+Output is not escaped
#3241Magazine Blocks – Blog Designer, Magazine & Newspaper Website Builder, Page Builder with Posts Blocks, Post Grid3965726k+block api version too low
#3242Mail Subscribe List3917943k+Input is not validated
#3243MailChimp Add-On for FormCraft395629800curl curl setopt
#3244Manage Enrollment for LearnDash394879400Unsafe printing function
#3245Map Categories to Pages394813700Output is not escaped
#3246Kikote – Location Picker at Checkout & Google Address AutoFill Plugin for WooCommerce3976641k+Missing Translators Comment
#3247Media Sync39193750k+Short PHP open tag found
#3248Mega Addons For WPBakery Page Builder391,32015420k+Text Domain Mismatch
#3249Meks Easy Photo Feed Widget39772710k+Output is not escaped
#3250Menubar39171461k+Output is not escaped