72% counter-number-showcase

Code Review | Counter Number Showcase, Fun Facts - Wordpress Animated Counter Plugin

WordPress plugin Counter Number Showcase, Fun Facts - Wordpress Animated Counter Plugin scored72%from 54 tests.

About plugin

  • Plugin page: counter-number-sh...
  • Plugin version: 1.3.7
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Jul 28, 2017
  • Latest release: Nov 10, 2023
  • Number of updates: 39
  • Update frequency: every 58.9 days
  • Top authors: wpshopmart (100%)

Code review

54 tests

User reviews

176 reviews

Install metrics

10,000+ active /304,966 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼3.18ms] Passed 4 tests

A check of server-side resources used by Counter Number Showcase, Fun Facts - Wordpress Animated Counter Plugin
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0934.25 ▼4.44
Dashboard /wp-admin3.41 ▲0.1146.40 ▼3.81
Posts /wp-admin/edit.php3.53 ▲0.1746.03 ▲1.37
Add New Post /wp-admin/post-new.php5.99 ▲0.1190.38 ▼5.84
Media Library /wp-admin/upload.php3.34 ▲0.1132.73 ▲1.92
All counters /wp-admin/edit.php?post_type=counter_numbers3.3834.52
Add New Counter /wp-admin/post-new.php?post_type=counter_numbers3.4740.70

Server storage [IO: ▲3.40MB] [DB: ▲0.00MB] Passed 3 tests

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 96 new files
Database: no new tables, 8 new options
New WordPress options
widget_theysaidso_widget
wpsm_cns_default_settings
widget_recent-posts
wpsm_cns_review
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Counter Number Showcase, Fun Facts - Wordpress Animated Counter Plugin
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,932 ▲17013.56 ▼0.7110.96 ▲9.2137.23 ▼6.72
Dashboard /wp-admin2,222 ▲455.68 ▲0.0289.46 ▼5.4137.36 ▼7.01
Posts /wp-admin/edit.php2,124 ▲241.94 ▼0.0239.70 ▲1.5736.27 ▲2.56
Add New Post /wp-admin/post-new.php1,554 ▲2525.03 ▲1.74607.13 ▼55.6772.59 ▲15.88
Media Library /wp-admin/upload.php1,424 ▲214.21 ▼0.0297.47 ▼1.0945.38 ▲5.03
All counters /wp-admin/edit.php?post_type=counter_numbers1,0931.9332.2531.33
Add New Counter /wp-admin/post-new.php?post_type=counter_numbers8,98712.46646.44275.09

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie WordPress options were found after uninstall: 8 options
    • wpsm_cns_default_settings
    • widget_recent-posts
    • wpsm_cns_review
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
    • > GET request to /wp-admin/post-new.php?post_type=counter_numbers
    • > Notice in wp-content/plugins/counter-number-showcase/inc/admin/settings.php+305
    Undefined variable: font_family_group

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/counter-number-showcase/templates/designs/index.php
  • 14× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_script() in wp-content/plugins/counter-number-showcase/inc/admin/script.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/counter-number-showcase/inc/admin/add-counter-box.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/counter-number-showcase/inc/admin/more-pro.php:141
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/counter-number-showcase/inc/admin/help.php:55
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/counter-number-showcase/inc/admin/add-counter-box-js-footer.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/counter-number-showcase/templates/shortcode.php:2
    • > PHP Notice
      Undefined variable: mydemo in wp-content/plugins/counter-number-showcase/templates/designs/index.php on line 5
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/counter-number-showcase/templates/designs/index.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/counter-number-showcase/templates/designs/style.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/counter-number-showcase/inc/admin/font-family.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Tags: Please reduce the number of tags, currently 15 tag instead of maximum 10
The official readme.txt might help

counter-number-showcase/counter-number-showcase.php Passed 13 tests

"Counter Number Showcase, Fun Facts - Wordpress Animated Counter Plugin" version 1.3.7's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
87 characters long description:
counter number showcase plugin is used to display counter number on blog and post page.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin26,415 lines of code in 73 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript132,0591,52612,804
CSS142511525,449
SVG1002,671
PHP17213851,965
Sass1434341,768
LESS1434441,758

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity1.38
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods16
▷ Static methods16.25%
▷ Public methods1593.75%
▷ Protected methods00.00%
▷ Private methods16.25%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 0% from 2 tests

Image compression 0% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
13 PNG files occupy 1.26MB with 0.65MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/wpshopmart-logo.png25.28KB13.46KB▼ 46.76%
assets/tooltip/img/title-color.png18.18KB8.07KB▼ 55.61%
(invalid) assets/images/cb.png502.24KB0.00KB▼ 100.00%
assets/images/ac.png40.44KB44.38KB0.00%
assets/tooltip/img/icon-color.png13.51KB5.90KB▼ 56.32%