WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedConstantFound
Non-prefixed constant
The plugin defines a constant without a plugin-specific prefix.
Why It Shows Up
WordPress loads many plugins in the same PHP runtime. Plugin Check found a global symbol or hook name that is not clearly namespaced to this plugin.
Why It Matters
Unprefixed globals can collide with WordPress core, themes, or other plugins, causing fatal errors, overwritten values, or handlers running in the wrong context.
How to Fix
- Choose a short, unique prefix or namespace based on the plugin slug or vendor name.
- Rename the constant so it cannot collide with code from another plugin.
- For public hooks, document the final hook name and keep it stable after release.
References
Affected Plugins
| Rank | Plugin | Score | Errors | Warnings | Installs | Added | Updated | Top Issue |
|---|---|---|---|---|---|---|---|---|
| #2051 | Latest Post Shortcode | 98 | 5 | 6 | 4k+ | Non-prefixed constant | ||
| #2052 | LitExtension: Store to WooCommerce Migration | 98 | 1 | 9 | 1k+ | Non-prefixed constant | ||
| #2053 | Multi Device Switcher | 98 | 2 | 9 | 20k+ | Non-prefixed function | ||
| #2054 | News Ticker Widget for Elementor | 98 | 2 | 2 | 4k+ | Non-prefixed constant | ||
| #2055 | NIF (Num. de Contribuinte Português) for WooCommerce | 98 | 2 | 9 | 5k+ | Non-prefixed constant | ||
| #2056 | PPWP – Password Protect Pages | 98 | 29 | 30k+ | Non-prefixed class | |||
| #2057 | Really Simple CAPTCHA | 98 | 2 | 2 | 300k+ | Non-prefixed constant | ||
| #2058 | SAR Friendly SMTP | 98 | 2 | 11 | 2k+ | Non-prefixed function | ||
| #2059 | ShareThis Share Buttons | 98 | 29 | 10k+ | Non-prefixed global variable | |||
| #2060 | Product Variation Swatches for WooCommerce – Smart Swatches | 98 | 16 | 800 | Non-prefixed hook name | |||
| #2061 | WebMan Amplifier | 98 | 13 | 2k+ | Non-prefixed class | |||
| #2062 | WPC Added To Cart Notification for WooCommerce | 98 | 17 | 3k+ | Non-prefixed class | |||
| #2063 | BjornTech Swish for WooCommerce | 98 | 7 | 11 | 2k+ | wp function not compatible with requires wp | ||
| #2064 | Google Analytics for WooCommerce | 98 | 20 | 100k+ | Non-prefixed class | |||
| #2065 | Wp Post Views – WordPress Post views counter | 98 | 3 | 10 | 4k+ | Non-prefixed class | ||
| #2066 | WPC Linked Variation for WooCommerce | 98 | 15 | 3k+ | Non-prefixed class | |||
| #2067 | WPC Name Your Price for WooCommerce | 98 | 16 | 6k+ | Non-prefixed class | |||
| #2068 | WPC Product Image Swap for WooCommerce | 98 | 15 | 1k+ | Non-prefixed class | |||
| #2069 | WPC Product Tabs for WooCommerce | 98 | 17 | 900 | Non-prefixed class | |||
| #2070 | WPC Product Videos for WooCommerce | 98 | 15 | 3k+ | Non-prefixed class | |||
| #2071 | WPC Sticky Add To Cart for WooCommerce | 98 | 17 | 2k+ | Non-prefixed class | |||
| #2072 | Wishlist for WooCommerce | 98 | 2 | 10 | 900 | Non-prefixed constant | ||
| #2073 | Zoho Flow – No-Code Workflow Automation | 98 | 11 | 8 | 5k+ | wp function not compatible with requires wp | ||
| #2074 | 3D Viewer Block – Interactive 3D Model Display | 99 | 3 | 1k+ | Non-prefixed constant | |||
| #2075 | Vertical Timeline Widget for Elementor | 99 | 10 | 10k+ | Non-prefixed function | |||
| #2076 | Enhanced Responsive Images | 99 | 1 | 2 | 50k+ | Missing direct file access protection | ||
| #2077 | BotBlocker Security – Firewall & Bot Protection | 99 | 5 | 3k+ | Non-prefixed constant | |||
| #2078 | Calendar | 99 | 1 | 3 | 4k+ | Non-prefixed constant | ||
| #2079 | Chart Block – Visualize Data with Bar, Line, Pie Charts | 99 | 9 | 1k+ | Non-prefixed constant | |||
| #2080 | Custom Post Type Widgets | 99 | 7 | 3 | 10k+ | Non Singular String Literal Text | ||
| #2081 | Dynamic Month & Year into Posts | 99 | 5 | 1 | 8k+ | wp function not compatible with requires wp | ||
| #2082 | Easy Table of Contents | 99 | 4 | 4 | 600k+ | Non-prefixed constant | ||
| #2083 | Button Plus for Elementor | 99 | 2 | 1 | 1k+ | Missing direct file access protection | ||
| #2084 | Layouts for Divi | 99 | 14 | 1k+ | Non-prefixed global variable | |||
| #2085 | Lazy Load for Comments | 99 | 6 | 2k+ | Non-prefixed constant | |||
| #2086 | Maintenance & Coming Soon Redirect Animation | 99 | 1 | 1 | 3k+ | Non-prefixed constant | ||
| #2087 | Before After Image | 99 | 5 | 800 | Non-prefixed constant | |||
| #2088 | Media Library Enable Infinite Scrolling | 99 | 1 | 1 | 8k+ | Non-prefixed constant | ||
| #2089 | Menu By User Roles | 99 | 1 | 1 | 1k+ | Non-prefixed constant | ||
| #2090 | No Nonsense | 99 | 4 | 1 | 1k+ | wp function not compatible with requires wp | ||
| #2091 | Portugal States (Distritos) for WooCommerce | 99 | 7 | 5k+ | Non-prefixed function | |||
| #2092 | Print Page Block – Print Full Page or Specific Section | 99 | 4 | 1k+ | Non-prefixed constant | |||
| #2093 | Quiz Builder for WooCommerce – Product Recommendations | 99 | 21 | 2k+ | Non-prefixed constant | |||
| #2094 | Quads Ads Manager for Google AdSense | 99 | 8 | 20k+ | Non-prefixed constant | |||
| #2095 | Quotes llama | 99 | 5 | 1k+ | Non-prefixed constant | |||
| #2096 | Social Media Feather | 99 | 4 | 10k+ | Non-prefixed constant | |||
| #2097 | Solace Extra | 99 | 1 | 5 | 10k+ | Non-prefixed class | ||
| #2098 | Speculative Loading | 99 | 7 | 70k+ | Non-prefixed global variable | |||
| #2099 | SVG Block | 99 | 6 | 4k+ | Non-prefixed hook name | |||
| #2100 | View Transitions | 99 | 3 | 10k+ | Non-prefixed constant |