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
#6251WooCommerce Product Details Customiser96562k+trademarked term
#6252WP Author Slug961662k+Text Domain Mismatch
#6253Content Filter – Censor All Offensive Content From Your Site96176500Text Domain Mismatch
#6254EditorFontsize9652500Missing direct file access protection
#6255WP Flipclock9678600Missing direct file access protection
#6256Htaccess File Editor – Safely Edit Htaccess File9641540k+Non-prefixed global variable
#6257WP Hyper Response96624k+trademarked term
#6258WP Reset96831300k+Non-prefixed global variable
#6259WP REST API – Pure Taxonomies9653400trademarked term
#6260WP-REST-API V2 Menus96543k+trademarked term
#6261WP-ShowHide966510k+trademarked term
#6262Follow Us Badges96791k+Non-prefixed global variable
#6263301 Redirects & 404 Error Log9742030k+Non-prefixed global variable
#6264ACF Autosize97354k+Non-prefixed hook name
#6265ACF: Better Search97111040k+Missing direct file access protection
#6266Acme Fix Images – Regenerate Thumbnails97553k+Missing direct file access protection
#6267Add Category to Pages973220k+Missing direct file access protection
#6268Add .html Extension to Pages9741700Missing direct file access protection
#6269Add HTML to Page9750400Missing direct file access protection
#6270Admin Bar Toggle9763400Missing Arg Domain
#6271Admin Color Schemes971314k+Text Domain Mismatch
#6272Admin Menu Search97503k+Missing Translators Comment
#6273Advanced Custom Fields Repeater & Flexible Content Fields Collapser97354k+trademarked term
#6274Advanced Google reCAPTCHA97315200k+Non-prefixed global variable
#6275Advanced Rich Text Tools for Gutenberg97343k+trademarked term
#6276AinoBlocks Accordion Faq Block9733600Missing direct file access protection
#6277All in One SEO – AI SEO Plugin to Boost SEO Rankings & Traffic (Schema, Local SEO, Sitemap & SEO Insights)972043m+wp function not compatible with requires wp
#6278Allow Swf Upload9760400Missing direct file access protection
#6279Allow Webp image97475k+Non-prefixed function
#6280Typing Effect977510k+Text Domain Mismatch
#6281Anti-Spambot9732500Missing direct file access protection
#6282Article Word Count97431k+Missing Arg Domain
#6283Aruba HiSpeed Cache97125100k+wp function not compatible with requires wp
#6284Autoset Featured Image97501k+Missing direct file access protection
#6285Autopost for X (formerly Autoshare for Twitter)971125k+Missing direct file access protection
#6286Before + After Images for Divi971233k+Missing direct file access protection
#6287Better Section Navigation971210600Post Not In exclude
#6288Bloginfo Shortcode9750700Missing direct file access protection
#6289Candid Advanced Toolset971021k+Missing direct file access protection
#6290Carousel for Divi97401k+Missing direct file access protection
#6291Change Excerpt Length9742400Missing Arg Domain
#6292Classic Menu Block97508k+Missing direct file access protection
#6293Clean Login972136k+Non-prefixed hook name
#6294CodePen Embedded Pens Shortcode97170800wp function not compatible with requires wp
#6295Coldbox Addons97112800Missing direct file access protection
#6296Columns Reordering For Elementor9742900Missing direct file access protection
#6297Contact Form 7 IE DatePicker and Number Spinner Fix97551k+trademarked term
#6298CubeWP Forms97834k+wp function not compatible with requires wp
#6299Custom Alt Text for Elementor Images97821k+Text Domain Mismatch
#6300Custom Currency Symbol for WooCommerce97721k+Text Domain Mismatch