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
#4951Nginx Helper714760200k+Non-prefixed global variable
#4952Print Bangla News7129172k+Output is not escaped
#4953Privyr CRM – Instant Lead Alerts for Contact Forms712254k+Non-prefixed function
#4954Quick and Easy FAQs7192910k+Non Singular String Literal Domain
#4955Really Simple Click To Call Bar712338k+Output is not escaped
#4956Social Fabric Analytics From Collective Bias711701k+Output is not escaped
#4957Visual Bible Verse of the Day Widget71271900Output is not escaped
#4958WindPress – Tailwind CSS integration for WordPress71161063k+Non-prefixed hook name
#4959Discount Rules for WooCommerce7110454100k+Non-prefixed global variable
#4960WP 4 Me Title Remover7117131k+Missing direct file access protection
#4961WP No Base Permalink7181010k+Unsafe printing function
#4962WP Widget in Navigation7137153k+Non Singular String Literal Domain
#4963WPS Notice Center711273k+Unsafe printing function
#4964Zapier for WordPress71112150k+Input is not sanitized
#4965Archiiv72630400Non-prefixed global variable
#4966Auto Featured Image from Title722441k+Setting is missing a sanitization callback
#4967BB Delete cache723151k+Input is not sanitized
#4968Block Archive.org via WordPress robots.txt7298400Output is not escaped
#4969Bulk Term Editor72199400Output is not escaped
#4970Click to top722282k+Output is not escaped
#4971Cloudinary – Deliver Images and Videos at Scale726911345k+Text Domain Mismatch
#4972Contact Form 7 Leads Tracking72323600Input is not sanitized
#4973Dashboard Wordcount72307500Output is not escaped
#4974Disable Title7220152k+Text Domain Mismatch
#4975Disclaimify – Affiliate Disclosure / Disclaimer for WordPress722191k+Missing nonce verification
#4976Display your Checkatrade72193400Output is not escaped
#4977Getsitecontrol — Email Marketing Plugin | Popup Maker, Automations & Newsletters7217111k+wp function not compatible with requires wp
#4978Gravity Forms CSS Ready Class Selector721844k+Non Singular String Literal Domain
#4979Calendar.online / Kalender.digital – Plugin723372k+Output is not escaped
#4980Login Logout Menu7272020k+Input is not sanitized
#4981Media File Sizes721451k+Output is not escaped
#4982Media Library Organizer – Folders, File Manager & Media Categories722013020k+Non-prefixed global variable
#4983Meks Smart Author Widget7224010k+Output is not escaped
#4984MemcacheD Is Your Friend7223331k+Non-prefixed function
#4985Minimal Maintenance Mode72120600Missing nonce verification
#4986My-Plugins7224630k+Missing Arg Domain
#4987Non-Purchasable WooCommerce Products7214131k+Input is not validated
#4988Property Hive Stamp Duty Calculator72392800Text Domain Mismatch
#4989Responsive Blocks – Page Builder for Blocks & Patterns7243433k+badly named files
#4990Responsive Owl Carousel for Elementor7240897k+Non-prefixed global variable
#4991Root Relative URLs729106k+Input is not sanitized
#4992Simple Local Avatars721416100k+Non-prefixed constant
#4993Smartwaiver Waiver Widget72178400Output is not escaped
#4994Social Media Icons Widget72181101k+badly named files
#4995Tabs Widget for Page Builder722273k+Text Domain Mismatch
#4996Starter Templates & Sites Pack by ThemeGrill72285170k+Non-prefixed hook name
#4997TinyPNG – JPEG, PNG & WebP image compression724073100k+Non-prefixed global variable
#4998Tiny Yardage Calculator72231300Output is not escaped
#4999Ultimate Member Custom Tab Builder Lite721215500Output is not escaped
#5000Waymark721632900Missing direct file access protection