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
#1751Yoo Slider – Image Slider & Video Slider32744209600Output is not escaped
#1752Advanced Custom Fields: Typography Field33445574k+Text Domain Mismatch
#1753Advanced Coupons for WooCommerce Coupons & Store Credit338421520k+Non-prefixed global variable
#1754Advanced Forms for ACF331692783k+Non-prefixed hook name
#1755AI WP Writer – SEO content generator, chatGPT, Gemini335815313k+Text Domain Mismatch
#1756App Builder – Create Native Android & iOS Apps On The Flight3373119600Text Domain Mismatch
#1757Archive Posts Sort Customize3333897600Output is not escaped
#1758Premium Portfolio Features for Phlox theme3320413740k+Output is not escaped
#1759AWeber – Free Sign Up Form and Landing Page Builder Plugin for Lead Generation and Email Newsletter Growth33332299k+Non-prefixed global variable
#1760Awesome Widgets for SiteOrigin Page Builder3331459500Text Domain Mismatch
#1761Background Per Page338056700Text Domain Mismatch
#1762Ultimate Before After Image Slider & Gallery – BEAF334888730k+Text Domain Mismatch
#1763Bosta WooCommerce33303180700Text Domain Mismatch
#1764Activity Plus Reloaded for BuddyPress3388931k+Output is not escaped
#1765Five Star Business Profile and Schema332891387k+Output is not escaped
#1766Addi – Cuotas que se adaptan a ti331062092k+Direct Query
#1767Cargus334864700Input is not sanitized
#1768CB Custom Beaver Builder Modules3374841k+Output is not escaped
#1769Century ToolKit3311878700Output is not escaped
#1770Chartify – WordPress Chart Plugin33764113k+Non-prefixed global variable
#1771Civic Cookie Control331,8812192k+Text Domain Mismatch
#1772Clicky Analytics331669210k+Output is not escaped
#1773Companion Auto Update3315929840k+Direct Query
#1774Companion Sitemap Generator – Simple, Smart, and SEO-Ready33118577k+Missing Translators Comment
#1775Conekta Payment Gateway33240662k+Text Domain Mismatch
#1776Contact Form Block336473500Non Singular String Literal Domain
#1777Contact Form Plugin33472202k+Non-prefixed function
#1778Contact List – Online Staff Directory & Address Book331183421k+Nonce verification recommended
#1779Chatbot with IBM watsonx Assistant3332483400Non Singular String Literal Domain
#1780Countdown Timer3331117900Text Domain Mismatch
#1781Device Detector33209112600Output is not escaped
#1782DJ-Accessibility – Accessibility Plugin33370483k+Text Domain Mismatch
#1783Easy Timer33784501k+Non-prefixed global variable
#1784Easy Upload Files During Checkout33218199500Unsafe printing function
#1785Echelon Widgets for SiteOrigin336675800Output is not escaped
#1786Human Presence – Stop Form Spam Without ReCaptcha3354651k+Request data is not unslashed
#1787Meta for WooCommerce3368189400k+Non-prefixed hook name
#1788Fastly33221661k+Text Domain Mismatch
#1789FastPixel Cache – Optimize Page Speed: Compress Images, Minify, Clean Database & CDN33523424k+Request data is not unslashed
#1790Gallery Custom Links33646230k+Non Singular String Literal Domain
#1791GetResponse Forms by Optin Cat33681381k+Missing direct file access protection
#1792WP GIF Uploader33117441k+Text Domain Mismatch
#1793Five Star Restaurant Reviews33242142400Output is not escaped
#1794Comments – GraphComment | AI-Moderated Comment System33196177400Unsafe printing function
#1795Gravity Forms Eway3351945500Missing Translators Comment
#1796GSheetConnector for Forminator Forms331282011k+Non-prefixed global variable
#1797Ultimate Addons for Elementor33812912m+Non-prefixed class
#1798Mentions légales [FR]33238482k+Text Domain Mismatch
#1799HurryTimer – An Scarcity and Urgency Countdown Timer for WordPress & WooCommerce3337713920k+Unsafe printing function
#1800Flipbox – Awesomes Flip Boxes Image Overlay334007,27910k+Input is not validated