Title: code: WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound
Last modified: December 15, 2025

---

# code: WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound

 *  Resolved [gonzalesc](https://wordpress.org/support/users/gonzalesc/)
 * (@gonzalesc)
 * [5 months, 3 weeks ago](https://wordpress.org/support/topic/code-wordpress-namingconventions-prefixallglobals-nonprefixedvariablefound/)
 * Hi.
 * I have an error: “Global variables defined by a theme/plugin should start with
   the theme/plugin prefix. Found: “$installmentItem”.”
 * and this is my code:
 *     ```wp-block-code
       <ul><?php foreach ( $installments['items'] as $installmentItem ) : ?><li><?php echo \esc_html( $installmentItem ); ?></li><?php endforeach; ?></ul>
       ```
   
 * Why does that point to a loop?
 * Regards

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [David Perez](https://wordpress.org/support/users/davidperez/)
 * (@davidperez)
 * [5 months, 3 weeks ago](https://wordpress.org/support/topic/code-wordpress-namingconventions-prefixallglobals-nonprefixedvariablefound/#post-18756942)
 * Where is that function? is it global? You need to share all context.
 *  Thread Starter [gonzalesc](https://wordpress.org/support/users/gonzalesc/)
 * (@gonzalesc)
 * [5 months, 3 weeks ago](https://wordpress.org/support/topic/code-wordpress-namingconventions-prefixallglobals-nonprefixedvariablefound/#post-18756963)
 * It is a template and it is all the content, because it is called from other function,
   but if you see, $installmentItem is not a global variable, only is part of a 
   loop.
 * I solved it add a prefix, $icalculator_installmentItem, because “icalculator”
   is my plugin name, but I think this is unnecessary the prefix in a loop.
 * Thanks
 *  Plugin Author [David Perez](https://wordpress.org/support/users/davidperez/)
 * (@davidperez)
 * [5 months, 3 weeks ago](https://wordpress.org/support/topic/code-wordpress-namingconventions-prefixallglobals-nonprefixedvariablefound/#post-18758249)
 * It’s nice to hear that you managed to solve it.
 *  [Jose Mortellaro](https://wordpress.org/support/users/giuse/)
 * (@giuse)
 * [5 months ago](https://wordpress.org/support/topic/code-wordpress-namingconventions-prefixallglobals-nonprefixedvariablefound/#post-18777581)
 * Hello,
 * I have the same issue.
 * Plugin Check is giving a lot of `WordPress.NamingConventions.PrefixAllGlobals.
   NonPrefixedVariableFound` warnings, even in cases where the variables are not
   global.
 * I suggest checking this, as it appears to be a bug.
 * Why should variables be prefixed if they aren’t global variables?

Viewing 4 replies - 1 through 4 (of 4 total)

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fcode-wordpress-namingconventions-prefixallglobals-nonprefixedvariablefound%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](https://ps.w.org/plugin-check/assets/icon.svg?rev=3166100)
 * [Plugin Check (PCP)](https://wordpress.org/plugins/plugin-check/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/plugin-check/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/plugin-check/)
 * [Active Topics](https://wordpress.org/support/plugin/plugin-check/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/plugin-check/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/plugin-check/reviews/)

 * 4 replies
 * 3 participants
 * Last reply from: [Jose Mortellaro](https://wordpress.org/support/users/giuse/)
 * Last activity: [5 months ago](https://wordpress.org/support/topic/code-wordpress-namingconventions-prefixallglobals-nonprefixedvariablefound/#post-18777581)
 * Status: resolved