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
#1501WooPayments: Integrated WooCommerce Payments30182308900k+Exception output is not escaped
#1502WooCommerce Tax (formerly WooCommerce Shipping & Tax)30103198600k+Non-prefixed class
#1503WP Admin UI Customize3062939030k+Non-prefixed global variable
#1504WP Docs302682711k+Output is not escaped
#1505WP Event Aggregator: Import Eventbrite events, Meetup events, social events and any iCal Events into Event Calendar301134191k+Non-prefixed global variable
#1506remarketable3028193600Output is not escaped
#1507WP Inventory Manager308562331k+Output is not escaped
#1508WP Mail SMTP by WPForms – The Most Popular SMTP and Email Log Plugin30323464m+Non-prefixed hook name
#1509WP Restaurant Price List3029595500Text Domain Mismatch
#1510WPS Cleaner3043049120k+Output is not escaped
#1511WPZOOM Addons for Beaver Builder302,1681774k+Text Domain Mismatch
#1512Yaad Sarig Payment Gateway For WC301582712k+Nonce verification recommended
#1513YayPricing – WooCommerce Dynamic Pricing & Discounts301741863k+Non-prefixed global variable
#1514YASR – Yet Another Star Rating Plugin for WordPress3025237810k+Output is not escaped
#1515YITH Pre-Order for WooCommerce303971,4646k+Non-prefixed global variable
#1516YITH WooCommerce Popup303951,5512k+Non-prefixed global variable
#1517YITH WooCommerce Product Slider Carousel303891,4794k+Non-prefixed global variable
#1518zahls.ch Credit Cards, PostFinance and TWINT for WooCommerce301212653k+Non-prefixed global variable
#1519Zoho CRM Lead Magnet301011,0253k+Request data is not unslashed
#1520a3 Lazy Load318323990k+Dynamic hook name
#1521ActiveCampaign – The autonomous marketing platform312359840k+Output is not escaped
#1522Extra Product Options Builder for WooCommerce311131942k+Non-prefixed global variable
#1523Advanced Category Excluder31349160700Output is not escaped
#1524Advanced Woo Search – Product Search for WooCommerce3122937770k+Nonce verification recommended
#1525AI Builder – Generate pages, blocks, images & translate with AI31101194400Non-prefixed global variable
#1526All-in-one contact buttons – WPSHARE247311081134k+Non-prefixed global variable
#1527Titan Anti-spam & Security – Brute Force Protection, 2FA & Spam Filter315719650k+Nonce verification recommended
#1528Apaczka.pl WooCommerce31992761k+Non-prefixed global variable
#1529APCu Manager3115313610k+Output is not escaped
#1530The SEO Framework – Fast, Automated, Effortless.31363609200k+Non-prefixed global variable
#1531AI ChatBot with ChatGPT and Content Generator by AYS31170378400Non-prefixed global variable
#1532Thanh Toán Quét Mã QR Code Tự Động – MoMo, ViettelPay, VNPay và 40 ngân hàng Việt Nam3159870700Text Domain Mismatch
#1533Яндекс Доставка (Boxberry)3146150500Missing nonce verification
#1534Buy Me a Coffee – Button and Widget Plugin311381406k+Output is not escaped
#1535CashBill.pl – Płatności WooCommerce31181101900Output is not escaped
#1536České služby pro WordPress31951391k+Output is not escaped
#1537cformsII317775363k+Unsafe printing function
#1538Newsletter Sign-Up for CleverReach31174722k+Output is not escaped
#1539CleverReach® WP31103934k+Non-prefixed global variable
#1540Co-marquage service-public.fr31842131k+Non-prefixed global variable
#1541Codeless Page Builder31415258900Text Domain Mismatch
#1542Colorbox Panels & Info Box313921821k+Non Singular String Literal Domain
#1543Cookie Dough Compliance and Consent for GDPR31539452500Non Singular String Literal Domain
#1544Copy Anything to Clipboard for WordPress – Copy Button, Copy Text & Copy Code3152513110k+Text Domain Mismatch
#1545Counter Number Showcase, Fun Facts – WordPress Animated Counter Plugin3125517010k+Non Singular String Literal Domain
#1546Theme Demo Importer and Patterns Library for CozyThemes – Cozy Essential Addons313933296k+Missing direct file access protection
#1547Crowdfundly31594402500Output is not escaped
#1548Custom WP Store Locator3126245400Non-prefixed global variable
#1549MultiVendorX – WooCommerce Multivendor Marketplace AI Powered Solutions316632732k+Text Domain Mismatch
#1550DirectoryPress Frontend31402563800Non-prefixed global variable