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
#6351Image Automatic Height Width9760400Missing direct file access protection
#6352Img Title Removal97321k+Missing direct file access protection
#6353instant.page97403k+Missing direct file access protection
#6354jQuery Updater978420k+library core files
#6355Koalendar – Easy Appointment Scheduling & Booking Plugin97831k+wp function not compatible with requires wp
#6356Last Updated Shortcode9734800Non-prefixed global variable
#6357LH Dashboard Notes97161500Missing Arg Domain
#6358Limit Post Add-On97220400wp function not compatible with requires wp
#6359List categories97525k+Missing Arg Domain
#6360Maestro Connector9774500Missing direct file access protection
#6361MetalpriceAPI9744500Missing direct file access protection
#6362MO Cache97331k+Non-prefixed hook name
#6363Modal Builder Block9742700Missing direct file access protection
#6364Nepali Date Converter97225900Non-prefixed function
#6365Newpost Catch9721510k+Non-prefixed hook name
#6366NiceJob9785700Non-prefixed function
#6367No Comments On Pages97401k+Missing direct file access protection
#6368No Right Click Images97141320k+wp function not compatible with requires wp
#6369Olark Live Chat973161k+Non-prefixed global variable
#6370Organize Media Folder973352k+Direct Query
#6371Overwrite Uploads97341k+Missing direct file access protection
#6372Page Management Dropdown9733600Direct Query
#6373Password bcrypt97412k+Direct Query
#6374Pattern Manager9762400Missing direct file access protection
#6375Payment gateway via Teya SecurePay for WooCommerce979621k+Text Domain Mismatch
#6376PHP Compatibility Checker97425200k+Text Domain Mismatch
#6377PHP Version97435k+Missing Version
#6378Podlove Web Player97844k+Missing direct file access protection
#6379PowerFolio – Portfolio & Image Gallery for Elementor97101210k+Non-prefixed hook name
#6380Post Update Add-On – Gravity Forms97442400Non Singular String Literal Domain
#6381Prevent Concurrent Logins97210900Non-prefixed function
#6382Rel Nofollow Checkbox97914k+Missing Arg Domain
#6383Relative URL97433k+wp function not compatible with requires wp
#6384Remove Category Word From Title9733500Non-prefixed function
#6385Remove IP97505k+Missing direct file access protection
#6386Remove Meta Generators97551k+wp function not compatible with requires wp
#6387Remove Widget Titles97507k+Missing direct file access protection
#6388Astra Customizer Reset977130k+Text Domain Mismatch
#6389Resizable Sidebar for the Gutenberg Block Editor97342k+Missing Version
#6390Responsive Video Embeds97322k+Missing direct file access protection
#6391Retina @2x9733700Missing Version
#6392Right Click Disable Orignal97431k+Missing Version
#6393RoleMaster Suite – User Role Editor for E-Commerce, Membership & Admin Panel9782700Missing direct file access protection
#6394rus to lat advanced97337k+Deprecated function: seems_utf8
#6395RV Embed PDF9750900Missing direct file access protection
#6396Search & Replace Everything by WPCode – Find and Replace Media, Text, Links, and More975420k+Missing direct file access protection
#6397Search Widget Post Types for Elementor9742600Deprecated parameter: load_plugin_textdomain parameter 2
#6398Sharpen Resized Images97431k+Non-prefixed hook name
#6399Shortcode Empty Paragraph Fix9740800Missing direct file access protection
#6400Shortcode Preview Block97531k+Missing Version