62% animated-number-counters

Code Review | Animated Number Counters

WordPress plugin Animated Number Counters scored62%from 54 tests.

About plugin

  • Plugin page: animated-number-c...
  • Plugin version: 1.8
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Aug 12, 2020
  • Latest release: Oct 19, 2023
  • Number of updates: 112
  • Update frequency: every 10.5 days
  • Top authors: wpmart (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

2,000+ active /26,951 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.97MB] [CPU: ▼4.62ms] Passed 4 tests

A check of server-side resources used by Animated Number Counters
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.43 ▲0.9744.28 ▲4.92
Dashboard /wp-admin4.28 ▲0.9747.83 ▼2.67
Posts /wp-admin/edit.php4.39 ▲1.0349.77 ▲0.64
Add New Post /wp-admin/post-new.php6.86 ▲0.9786.78 ▼16.20
Media Library /wp-admin/upload.php4.20 ▲0.9737.58 ▼0.23
Template 21-30 /wp-admin/admin.php?page=anc-6310-counter-21-304.3461.13
License /wp-admin/admin.php?page=anc-6310-counter-license4.1840.15
How to use /wp-admin/admin.php?page=anc-6310-counter-use4.1844.44
Import/Export Plugin /wp-admin/admin.php?page=anc-6310-counter-import-export4.1854.82
Manage Counter Profiles /wp-admin/admin.php?page=anc-6310-accordion-add-edit4.5449.48
Template 11-20 /wp-admin/admin.php?page=anc-6310-counter-11-204.3443.01
All Created Templates /wp-admin/admin.php?page=animated-number-counters4.1940.71
Template 01-10 /wp-admin/admin.php?page=anc-6310-counter-01-104.3439.29

Server storage [IO: ▲4.78MB] [DB: ▲0.01MB] Passed 3 tests

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 172 new files
Database: 3 new tables, 8 new options
New tables
wp_anc_6310_counter
wp_anc_6310_icons
wp_anc_6310_style
New WordPress options
widget_recent-posts
db_upgraded
can_compress_scripts
widget_theysaidso_widget
anc_6310_install_default
widget_recent-comments
theysaidso_admin_options
anc_6310_version_info

Browser metrics Passed 4 tests

An overview of browser requirements for Animated Number Counters
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,953 ▲19213.84 ▼0.799.11 ▲7.3739.82 ▼0.16
Dashboard /wp-admin2,246 ▲695.56 ▼0.0585.31 ▼3.0840.14 ▲0.80
Posts /wp-admin/edit.php2,154 ▲541.96 ▼0.0238.23 ▲5.3736.74 ▼1.28
Add New Post /wp-admin/post-new.php1,576 ▲4718.60 ▼4.69632.35 ▲6.4768.12 ▲11.59
Media Library /wp-admin/upload.php1,454 ▲544.16 ▼0.0396.22 ▼14.7641.39 ▼7.90
Template 21-30 /wp-admin/admin.php?page=anc-6310-counter-21-309,7142.3485.19550.50
License /wp-admin/admin.php?page=anc-6310-counter-license9651.9429.1534.84
How to use /wp-admin/admin.php?page=anc-6310-counter-use1,47510.21270.9973.55
Import/Export Plugin /wp-admin/admin.php?page=anc-6310-counter-import-export9451.8926.6359.00
Manage Counter Profiles /wp-admin/admin.php?page=anc-6310-accordion-add-edit5,9363.4253.40278.53
Template 11-20 /wp-admin/admin.php?page=anc-6310-counter-11-209,1892.3376.95338.41
All Created Templates /wp-admin/admin.php?page=animated-number-counters9042.0323.5839.07
Template 01-10 /wp-admin/admin.php?page=anc-6310-counter-01-106,39525.09789.47406.59

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The uninstall procedure failed, leaving 3 tables in the database
    • wp_anc_6310_style
    • wp_anc_6310_icons
    • wp_anc_6310_counter
  • Zombie WordPress options detected upon uninstall: 8 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • anc_6310_version_info
    • anc_6310_install_default
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/animated-number-counters/output/counter-01.php
    • > /wp-content/plugins/animated-number-counters/settings/helper/tab-menu.php
  • 307× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_row() on null in wp-content/plugins/animated-number-counters/settings/counters/counter-25.php:15
    • > PHP Notice
      Undefined variable: bgType in wp-content/plugins/animated-number-counters/settings/css/_css-20.php on line 8
    • > PHP Notice
      Undefined variable: bgType in wp-content/plugins/animated-number-counters/settings/css/_css-06.php on line 17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/animated-number-counters/settings/form/_form-28.php:3
    • > PHP Notice
      Undefined variable: bgType in wp-content/plugins/animated-number-counters/settings/css/_css-09.php on line 15
    • > PHP Warning
      include(anc_6310_plugin_urlsettings/helper/number-counter-save.php): failed to open stream: No such file or directory in wp-content/plugins/animated-number-counters/settings/counters/counter-07.php on line 5
    • > PHP Notice
      Undefined variable: bgType in wp-content/plugins/animated-number-counters/settings/css/_css-19.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_media() in wp-content/plugins/animated-number-counters/settings/form/_form-13.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/animated-number-counters/settings/helper/slider_form.php:4
    • > PHP Notice
      Undefined variable: bgType in wp-content/plugins/animated-number-counters/settings/css/_css-17.php on line 8

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following user-side errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=anc-6310-accordion-add-edit
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: jQuery(...).fontselect is not a function" "TypeError: jQuery(...).fontselect is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/animated-number-counters/settings/helper/_common-helper.js?ver=6.3.1:158:5)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=anc-6310-counter-use
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: jQuery(...).sortable is not a function" "TypeError: jQuery(...).sortable is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/animated-number-counters/settings/helper/_common-helper.js?ver=6.3.1:65:42)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=anc-6310-accordion-add-edit
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught TypeError: jQuery(...).fontselect is not a function
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=anc-6310-counter-use
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught TypeError: jQuery(...).sortable is not a function

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
8 plugin tags: animated counters, number counter, animated numbers, animated number, animated numbers counter...

animated-number-counters/index.php 85% from 13 tests

This is the main PHP file of "Animated Number Counters" version 1.8, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("animated-number-counters.php" instead of "index.php")
  • Description: The description should be shorter than 140 characters (currently 202 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin65,020 lines of code in 166 files:
LanguageFilesBlank linesComment linesLines of code
PHP1181,3739945,275
JavaScript3819831613,094
CSS101,122196,651

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code2.16
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions42
▷ Named functions42100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
3 PNG files occupy 0.07MB with 0.04MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/css/hover.png1.27KB0.66KB▼ 48.23%
assets/css/fs-sprite.png1.07KB0.18KB▼ 82.82%
assets/css/jquery.minicolors.png67.02KB34.31KB▼ 48.80%