72% tf-numbers-number-counter-animaton

Code Review | Themeflection Numbers - Number Counter and Animated Numbers

WordPress plugin Themeflection Numbers - Number Counter and Animated Numbers scored72%from 54 tests.

About plugin

  • Plugin page: tf-numbers-number...
  • Plugin version: 2.0.6
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4.0-6.3
  • WordPress version: 6.3.1
  • First release: Aug 15, 2015
  • Latest release: Sep 6, 2023
  • Number of updates: 105
  • Update frequency: every 28.1 days
  • Top authors: zutigrm (87.62%)metagauss (13.33%)

Code review

54 tests

User reviews

32 reviews

Install metrics

4,000+ active /89,049 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.13MB] [CPU: ▼2.63ms] Passed 4 tests

A check of server-side resources used by Themeflection Numbers - Number Counter and Animated Numbers
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1036.65 ▼3.99
Dashboard /wp-admin3.43 ▲0.1348.31 ▼2.08
Posts /wp-admin/edit.php3.54 ▲0.1950.01 ▲7.23
Add New Post /wp-admin/post-new.php6.03 ▲0.1586.25 ▼7.40
Media Library /wp-admin/upload.php3.35 ▲0.1238.19 ▲2.95
Licenses /wp-admin/admin.php?page=ed-licencing2.055.98
Addons /wp-admin/admin.php?page=tf-addons3.3932.36
About /wp-admin/admin.php?page=tf-dashboard3.3533.43

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 108 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
recovery_mode_email_last_sent
db_upgraded
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Themeflection Numbers - Number Counter and Animated Numbers
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,925 ▲17914.07 ▼0.365.05 ▲3.3840.34 ▼7.05
Dashboard /wp-admin2,241 ▲535.01 ▼0.02101.51 ▼15.0042.79 ▼3.74
Posts /wp-admin/edit.php2,127 ▲382.28 ▲0.2742.15 ▲2.3033.38 ▼4.85
Add New Post /wp-admin/post-new.php1,543 ▲1023.39 ▲2.32711.36 ▲67.6959.71 ▲0.18
Media Library /wp-admin/upload.php1,426 ▲414.36 ▲0.1796.85 ▼6.3842.29 ▼2.74
Licenses /wp-admin/admin.php?page=ed-licencing450.440.239.34
Addons /wp-admin/admin.php?page=tf-addons9242.1527.3648.93
About /wp-admin/admin.php?page=tf-dashboard1,44611.07258.8581.09

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 detected upon uninstall: 7 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • recovery_mode_email_last_sent
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These errors were triggered by the plugin
    • > GET request to /wp-admin/admin.php?page=ed-licencing
    • > Error in wp-content/plugins/tf-numbers-number-counter-animaton/inc/license.php+184
    Uncaught Error: Call to undefined function wp_verify_nonce() in wp-content/plugins/tf-numbers-number-counter-animaton/inc/license.php:184
    Stack trace:
    #0 wp-content/plugins/tf-numbers-number-counter-animaton/tf-random_numbers.php(65): require_once()
    #1 wp-settings.php(462): include_once('/var/www/wordpr...')
    #2 wp-config.php(129): require_once('/var/www/wordpr...')
    #3 wp-load.php(50): require_once('/var/www/wordpr...')
    #4 wp-admin/admin.php(34): require_once('/var/www/wordpr...')
    #5 {main}
    thrown
    • > GET request to /wp-admin/admin.php?page=ed-licencing
    • > User notice in wp-includes/functions.php+5905
    Function is_embed was called incorrectly. Conditional query tags do not work before the query is run. Before then, they always return false. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.)
    • > GET request to /wp-admin/admin.php?page=ed-licencing
    • > User notice in wp-includes/functions.php+5905
    Function is_search was called incorrectly. Conditional query tags do not work before the query is run. Before then, they always return false. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.)

SRP 50% 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
Please fix the following
  • 10× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/tf-numbers-number-counter-animaton/cmb2/bootstrap.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/tf-numbers-number-counter-animaton/inc/license.php:3
    • > PHP Fatal error
      Uncaught Error: Interface 'TFNumbersOpsInterface' not found in wp-content/plugins/tf-numbers-number-counter-animaton/options/numbers.php:4
    • > PHP Fatal error
      Uncaught Error: Interface 'TFNumbersOpsInterface' not found in wp-content/plugins/tf-numbers-number-counter-animaton/options/numbers-style.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/tf-numbers-number-counter-animaton/inc/pages/addons.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'TFNumbersOpsInterface' not found in wp-content/plugins/tf-numbers-number-counter-animaton/options/general.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tf-numbers-number-counter-animaton/cmb2/init.php:71
    • > PHP Fatal error
      Uncaught Error: Interface 'TFNumbersOpsInterface' not found in wp-content/plugins/tf-numbers-number-counter-animaton/options/layouts.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/tf-numbers-number-counter-animaton/inc/pages/dashboard.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tf-numbers-number-counter-animaton/inc/vc-shortcode.php:40

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
These are user-side errors you should fix
    • > GET request to /wp-admin/admin.php?page=ed-licencing
    • > Network (severe)
    wp-admin/admin.php?page=ed-licencing - Failed to load resource: the server responded with a status of 500 (Internal Server Error)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
7 plugin tags: numbers, numbers counter, animated numbers, numbers showcase, number animation...

tf-numbers-number-counter-animaton/tf-random_numbers.php 85% from 13 tests

"Themeflection Numbers - Number Counter and Animated Numbers" version 2.0.6's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • 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
  • Main file name: The principal plugin file should be the same as the plugin slug ("tf-numbers-number-counter-animaton.php" instead of "tf-random_numbers.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin14,302 lines of code in 59 files:
LanguageFilesBlank linesComment linesLines of code
PHP331,1232,1794,931
CSS61,0231,0294,320
SVG1002,671
Sass11168231,116
JavaScript72161511,018
HTML1351246

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity26.85
▷ Minimum class complexity1.00
▷ Maximum class complexity107.00
Average method complexity3.53
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces1
Interfaces1
Traits0
Classes25
▷ Abstract classes00.00%
▷ Concrete classes25100.00%
▷ Final classes00.00%
Methods269
▷ Static methods4717.47%
▷ Public methods25092.94%
▷ Protected methods93.35%
▷ Private methods103.72%
Functions30
▷ Named functions30100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants880.00%
▷ Class constants220.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
24 PNG files occupy 0.09MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/n8.png15.97KB6.73KB▼ 57.85%
cmb2/images/ui-icons_454545_256x240.png4.27KB4.11KB▼ 3.78%
assets/images/n1.png3.18KB2.05KB▼ 35.43%
cmb2/images/ui-bg_glass_75_e6e6e6_1x400.png0.11KB0.14KB0.00%
cmb2/images/ui-bg_glass_75_dadada_1x400.png0.11KB0.16KB0.00%