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
#901Event Genius – Event Management, Events Calendar, Registration, and RSVP251811,579500Non-prefixed global variable
#902Events Made Easy255216,3241k+Non-prefixed function
#903F4 Post Tree255361,332500Non-prefixed global variable
#904胖鼠采集(Fat Rat Collect)25630190900Missing Arg Domain
#905FlatPM – Ad Manager, AdSense and Custom Code253,01755710k+Text Domain Mismatch
#906FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler253214557k+Non-prefixed global variable
#907Lightbox & Modal Popup WordPress Plugin – FooBox256101,365100k+Non-prefixed global variable
#908Photo Gallery by FooGallery : Responsive Image Gallery, Masonry Gallery & Carousel258761,798100k+Non-prefixed global variable
#909AnWP Football Leagues253,5981,955800Text Domain Mismatch
#910Form Vibes – Save Contact Form 7 & Elementor Form Entries to Database257161,50910k+Non-prefixed global variable
#911WP Fast Total Search – The Power of Indexed Search252092911k+Non-prefixed global variable
#912FunnelKit – Funnel Builder for WooCommerce Checkout253,1642,62430k+Text Domain Mismatch
#913Gallery Images Ape255883411k+Output is not escaped
#914Photo Gallery by Ays – Responsive Image Gallery254668201k+Output is not escaped
#915Portfolio Gallery – Responsive Image Gallery251082,4631k+Non-prefixed global variable
#916GD Rating System251,5111,0431k+Output is not escaped
#917GD Security Headers254075211k+Output is not escaped
#918GeekyBot — AI Copilot, Chatbot, WooCommerce Lead Gen & Zero-Prompt Content25888636k+Non-prefixed global variable
#919Genesis Club Lite25513317900Output is not escaped
#920Simple Giveaways – Grow your business, email lists and traffic with contests259562,384400Non-prefixed global variable
#921WPBruiser {no- Captcha anti-Spam}2564625910k+Non Singular String Literal Domain
#922MonsterInsights – Google Analytics Dashboard for WordPress (Website Stats Made Easy)251164412m+Nonce verification recommended
#923Site Kit by Google – Analytics, Search Console, AdSense, Speed251,3042425m+Missing direct file access protection
#924Sitemap by BestWebSoft – WordPress XML Site Map Page Generator Plugin2560820720k+Text Domain Mismatch
#925Logo Slider – Logo Showcase, Logo Carousel, Logo Gallery and Client Logo Presentation2578931330k+Text Domain Mismatch
#926Team Members – A WordPress Team Plugin with Gallery, Grid, Carousel, Slider, Table, List, and More251,7842,2222k+Non-prefixed global variable
#927Solid Testimonials – Testimonial Slider, Video Testimonials & Customer Reviews256451,5851k+Non-prefixed global variable
#928Hardcore Google Fonts Localizer25331261800Text Domain Mismatch
#929HashBar – Announcement, Notification Bar & Popup Campaign252,7186108k+Text Domain Mismatch
#930Cool Author Box – For Widget and Post Content258531,379600Non-prefixed global variable
#931HT Contact Form – Drag & Drop Form Builder for WordPress2516059710k+Non-prefixed global variable
#932Hydra Booking — Appointment Scheduling & Booking Calendar252356992k+Non-prefixed global variable
#933Image SEO – AI-Driven Image SEO Optimizer253503281k+Text Domain Mismatch
#934Independent Analytics – WordPress Analytics Plugin251,1482,293100k+Non-prefixed global variable
#935Index WP MySQL For Speed2525025550k+Output is not escaped
#936Smash Balloon Social Photo Feed – Easy Social Feeds Plugin254491,3001m+Interpolated SQL is not prepared
#937Instantio — Side Cart & One-Page Checkout for WooCommerce25568369700Output is not escaped
#938IP Location Block2552162410k+Output is not escaped
#939IP Locator25482211600Text Domain Mismatch
#940JobWP – Job Board, Job Listing, Career Page and Recruitment Plugin251,5411,5781k+Non-prefixed global variable
#941JoomSport – for Sports: Team & League, Football, Hockey & more255231,7471k+Direct Query
#942kk Star Ratings – Rate Post & Collect User Feedbacks257721,38870k+Non-prefixed global variable
#943Knit Pay – Cashfree, Instamojo, Razorpay, PayPal and more254,0191,2652k+Text Domain Mismatch
#944Limit Login Attempts Security – Login Security, 2FA, Firewall, Brute Force Prevention256176141m+Unsafe printing function
#945Loginizer258145041m+Output is not escaped
#946Bulk Page Generator – LPagery256651,9223k+Non-prefixed global variable
#947M Chart255581,4653k+Non-prefixed global variable
#948MaxButtons – Create buttons2562640470k+Output is not escaped
#949Media Cleaner: Clean your WordPress!2526354690k+Direct Query
#950Media Cloud Sync251,0952741k+Exception output is not escaped