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
#1801Image Source Control Lite – Show Image Credits and Captions331402213k+Non-prefixed hook name
#1802Inactive User Deleter33453170800Output is not escaped
#1803InPost Gallery33105245700Non-prefixed global variable
#1804WPZOOM Social Feed Widget & Block3331027860k+Unsafe printing function
#1805Intagrate Lite33941524k+date date
#1806IP2Location Redirection331981227k+Output is not escaped
#1807IssueM3356173600Request data is not unslashed
#1808Janolaw AGB Hosting33198111k+Short PHP open tag found
#1809JetWidgets for Elementor and WooCommerce331871467k+Text Domain Mismatch
#1810jQuery Manager for WordPress3386247k+Output is not escaped
#1811Logo Showcase Ultimate – Logo Carousel, Logo Slider & Logo Grid332741063k+Text Domain Mismatch
#1812LWSCache33471046k+Non-prefixed global variable
#1813Forms for Mailchimp by Optin Cat – Grow Your MailChimp List33711332k+Missing direct file access protection
#1814MailUp for WordPress – Email and Newsletter Subscription Form332511002k+Text Domain Mismatch
#1815MWB HubSpot for WooCommerce – CRM, Abandoned Cart, Email Marketing, Marketing Automation & Analytics33262797k+Non-prefixed global variable
#1816MAS Companies For WP Job Manager33623081k+Non-prefixed hook name
#1817MaxiBlocks Builder | 17,000+ Design Assets, Patterns, Icons & Starter Sites332503800Non-prefixed function
#1818Membership For WooCommerce3340659900Non-prefixed global variable
#1819Merge + Minify + Refresh3378264k+date date
#1820Mollie Payments for WooCommerce3370123100k+Dynamic hook name
#1821More Types33227198800Non-prefixed global variable
#1822Newebpay Payment33146115600Text Domain Mismatch
#1823News Announcement Scroll332372592k+Non-prefixed global variable
#1824GDPR CCPA Compliance & Cookie Consent Banner33622871k+Non Singular String Literal Domain
#1825Nomad World Map33424191700Text Domain Mismatch
#1826Notification Master – Real-Time WordPress Notifications With Email, SMS, Webhooks & More332932151k+Text Domain Mismatch
#1827Pastacode337766400Non-prefixed global variable
#1828Payflex Payment Gateway33181611k+Text Domain Mismatch
#1829Payoneer Checkout33168455k+Exception output is not escaped
#1830PeproDev WooCommerce Receipt Uploader33325491k+Non Singular String Literal Domain
#1831پینوا | Pinova3317175500Output is not escaped
#1832Plugin Organizer3332525710k+Output is not escaped
#1833Podcast Subscribe Buttons33552395k+Text Domain Mismatch
#1834FancyPost – Post Blocks, Grids & Sliders for Block Editor and Elementor33356271500Output is not escaped
#1835Post Lists View Custom334621502k+Missing Arg Domain
#1836PublishPress Checklists: Pre-Publishing Approval Checklist – Validate Post Requirements331401823k+Missing Translators Comment
#1837QNAP NAS Backup33374702k+Non Singular String Literal Domain
#1838Quick Restaurant Reservations33654179500Text Domain Mismatch
#1839Frisbii Pay33912921k+Non-prefixed global variable
#1840Rename wp-login.php to anything you want33251117500Output is not escaped
#1841Review Slider for WooCommerce33160422400Non-prefixed global variable
#1842RTMKit331138850k+Non-prefixed global variable
#1843RSS Feed Pro3348416500Output is not escaped
#1844Live Sales Notification (Recent Sales Popups)33114120400SQL query is not prepared
#1845Schema & Structured Data for WP & AMP3363246100k+Non-prefixed global variable
#1846Service Box – Icon Box Showcase333852303k+Non Singular String Literal Domain
#1847Sessions33196103900Output is not escaped
#1848ShopPress – Shop Builder for Elementor and WooCommerce3311879500Non-prefixed global variable
#1849Slider Path for Elementor33329100700Text Domain Mismatch
#1850SMTP2GO for WordPress – Email Made Easy3318611130k+Output is not escaped