84% animated-counters

Code Review | Animated Counters

WordPress plugin Animated Counters scored84%from 54 tests.

About plugin

  • Plugin page: animated-counters
  • Plugin version: 2.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-6.3.1
  • WordPress version: 6.3.1
  • First release: Jan 8, 2017
  • Latest release: Oct 31, 2023
  • Number of updates: 39
  • Update frequency: every 63.7 days
  • Top authors: freeben (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

700+ active /11,336 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.00MB] [CPU: ▼13.64ms] Passed 4 tests

This is a short check of server-side resources used by Animated Counters
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.32 ▼8.22
Dashboard /wp-admin3.31 ▼0.0345.32 ▼20.99
Posts /wp-admin/edit.php3.36 ▲0.0045.08 ▼1.55
Add New Post /wp-admin/post-new.php5.89 ▲0.0181.52 ▼23.78
Media Library /wp-admin/upload.php3.23 ▲0.0037.60 ▲3.11

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Animated Counters
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,870 ▲10913.52 ▼0.849.41 ▲7.5542.46 ▼0.05
Dashboard /wp-admin2,195 ▲185.63 ▲0.0387.08 ▼3.0436.65 ▼10.89
Posts /wp-admin/edit.php2,100 ▼02.00 ▼0.1636.32 ▼0.1037.08 ▼0.89
Add New Post /wp-admin/post-new.php1,526 ▼423.07 ▼0.13668.39 ▲64.5549.62 ▼8.62
Media Library /wp-admin/upload.php1,403 ▲64.11 ▼0.1092.83 ▼15.0041.42 ▼3.26

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/animated-counters/animated-counters.php:34

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
1 plugin tags: animated counters

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

The entry point to "Animated Counters" version 2.0 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Domain Path: The domain path is invalid: folder "/languages" does not exist
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

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
No dangerous file extensions were detected157 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript3518109
PHP16948

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.56
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.06MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/animatedcounters.png66.24KB46.22KB▼ 30.22%