Title: theme/plugin prefix error
Last modified: November 8, 2025

---

# theme/plugin prefix error

 *  Resolved [jim5471](https://wordpress.org/support/users/jim5471/)
 * (@jim5471)
 * [4 months, 3 weeks ago](https://wordpress.org/support/topic/theme-plugin-prefix-error/)
 * Hi there,
 * I have a question about the 1.7.0 update which is listing a number of new errors(
   below) referring to “theme/plugin prefix”.
 * Can’t seem to find anywhere that has a specific answer and haven’t been able 
   to work it out !
 * What would be the “plugin prefix” for a plugin named “My Plugin” ?
   Do I need 
   a line of code to set the “plugin prefix” ?It would be useful if PCP stated what
   the “theme/plugin prefix” was so you can work out what is wrong.
 * ERRORS:
   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound Classes
   declared by a theme/plugin should start with the theme/plugin prefix.
 * WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound
    Global
   variables defined by a theme/plugin should start with the theme/plugin prefix.

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

 *  Thread Starter [jim5471](https://wordpress.org/support/users/jim5471/)
 * (@jim5471)
 * [4 months, 3 weeks ago](https://wordpress.org/support/topic/theme-plugin-prefix-error/#post-18712018)
 * Answering my own question…
   Turned out the problem was PCP wasn’t able to traverse
   this one plugin. I realised this when I moved to a different plugin.The “plugin
   prefix” for a plugin named “My Plugin” is “my_plugin”.The WordPress documentation(
   below) does not include the “theme/plugin prefix” requirement.[https://developer.wordpress.org/plugins/plugin-basics/best-practices/](https://developer.wordpress.org/plugins/plugin-basics/best-practices/)
   This document says…“All globally accessible code should be prefixed with a unique
   identifier…In order to prevent conflicts with other plugins, your prefix should
   be at least 4 letters long, though we recommend 5″So according to WP it doesn’t
   need to be the “theme/plugin prefix”.[https://developer.wordpress.org/coding-standards/wordpress-coding-standards/php/](https://developer.wordpress.org/coding-standards/wordpress-coding-standards/php/)
   In this document there is no mention of using a prefix for globals.This shows
   that PCP is not presently aligned with WP best practice.Clearly a prefix is required
   and at least 4-5 letters would be my choice rather than the “theme/plugin prefix”
   which is now causing me problems.
    -  This reply was modified 4 months, 3 weeks ago by [jim5471](https://wordpress.org/support/users/jim5471/).
    -  This reply was modified 4 months, 3 weeks ago by [jim5471](https://wordpress.org/support/users/jim5471/).
 *  Thread Starter [jim5471](https://wordpress.org/support/users/jim5471/)
 * (@jim5471)
 * [4 months, 3 weeks ago](https://wordpress.org/support/topic/theme-plugin-prefix-error/#post-18712052)
 * More…
 * The current github documentation does not specify “theme/plugin prefix” for prefixing.
 * [https://github.com/WordPress/plugin-check/blob/trunk/docs/checks.md](https://github.com/WordPress/plugin-check/blob/trunk/docs/checks.md)
 * says this…
   “prefixing – Checks plugin for unique prefixing for everything the
   plugin defines in the public namespace”
 *  Thread Starter [jim5471](https://wordpress.org/support/users/jim5471/)
 * (@jim5471)
 * [4 months, 3 weeks ago](https://wordpress.org/support/topic/theme-plugin-prefix-error/#post-18712124)
 * I have found the problem.
 * My plugin uses SimpleXLSX from [https://github.com/shuchkin/simplexlsx/](https://github.com/shuchkin/simplexlsx/)
 * This is a single php file: SimpleXLSX.php
 * When this file is included in the plugin, PCP throws “theme/plugin prefix” errors.
   Take the file out and the errors go away.
 * PCP reports no errors for SimpleXLSX and there are no PHP errors.
 *  Thread Starter [jim5471](https://wordpress.org/support/users/jim5471/)
 * (@jim5471)
 * [4 months, 3 weeks ago](https://wordpress.org/support/topic/theme-plugin-prefix-error/#post-18716399)
 * All sorted -thanks
 *  Plugin Author [David Perez](https://wordpress.org/support/users/davidperez/)
 * (@davidperez)
 * [3 months, 3 weeks ago](https://wordpress.org/support/topic/theme-plugin-prefix-error/#post-18749264)
 * Great that you found it! All global variables, constants and functions basically
   have to be prefixed.

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

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ftheme-plugin-prefix-error%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/)

 * 5 replies
 * 5 participants
 * Last reply from: [David Perez](https://wordpress.org/support/users/davidperez/)
 * Last activity: [3 months, 3 weeks ago](https://wordpress.org/support/topic/theme-plugin-prefix-error/#post-18749264)
 * Status: resolved