cabrerahector / wordpress-popular-posts

WordPress Popular Posts - A highly customizable WordPress widget that displays your most popular posts.
https://wordpress.org/plugins/wordpress-popular-posts/
GNU General Public License v2.0
280 stars 82 forks source link

Check that the plugin isn't accidentally overriding WP global variables #354

Closed cabrerahector closed 1 year ago

cabrerahector commented 1 year ago

Naming variables as $blog_id, $taxonomy, $posts, etc. is probably not a great idea as this might introduce some unexpected bugs to a WordPress based website. See PHPCS errors preventing plugin update for example, while it's not the case (WPP isn't overriding any variables here) PHPCS does warn about this problem.

Let's make sure that we're using variable names that are unique to the plugin (eg. maybe by adding a wpp_ prefix to them?)