84% number-counter

Code Review | Number Counter

WordPress plugin Number Counter scored84%from 54 tests.

About plugin

  • Plugin page: number-counter
  • Plugin version: 1.1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.1
  • WordPress version: 6.3.1
  • First release: Jul 29, 2021
  • Latest release: Dec 12, 2022
  • Number of updates: 11
  • Update frequency: every 45.6 days
  • Top authors: wpdevteam (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /3,118 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
This plugin's installer ran successfully

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

This is a short check of server-side resources used by Number Counter
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1343.75 ▲2.48
Dashboard /wp-admin3.42 ▲0.1248.14 ▼6.32
Posts /wp-admin/edit.php3.53 ▲0.1852.45 ▲4.85
Add New Post /wp-admin/post-new.php6.03 ▲0.1491.03 ▲2.39
Media Library /wp-admin/upload.php3.34 ▲0.1139.01 ▼0.46

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 51 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Number Counter
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.17 ▼1.212.08 ▲0.2043.96 ▼3.54
Dashboard /wp-admin2,203 ▲154.87 ▼0.98101.32 ▼15.7144.23 ▲2.54
Posts /wp-admin/edit.php2,086 ▼62.06 ▲0.0336.31 ▼7.5833.36 ▼2.96
Add New Post /wp-admin/post-new.php1,652 ▲13824.29 ▲6.73671.76 ▼22.0739.20 ▼19.17
Media Library /wp-admin/upload.php1,391 ▲34.17 ▼0.0495.79 ▼11.4046.32 ▼1.39

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: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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 items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/number-counter/number-counter.php:25

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
8 plugin tags: number counter, running numbers, gutenberg, gutenberg blocks, blocks...

number-counter/number-counter.php 92% from 13 tests

This is the main PHP file of "Number Counter" version 1.1.5, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Description: The description should be shorter than 140 characters (currently 155 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin16,943 lines of code in 29 files:
LanguageFilesBlank linesComment linesLines of code
SVG501211,462
CSS52464,769
PHP10112128600
JavaScript715896
JSON20016

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.63
Average class complexity24.00
▷ Minimum class complexity1.00
▷ Maximum class complexity49.00
Average method complexity5.04
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes120.00%
Methods26
▷ Static methods1038.46%
▷ Public methods2284.62%
▷ Protected methods00.00%
▷ Private methods415.38%
Functions3
▷ Named functions133.33%
▷ Anonymous functions266.67%
Constants3
▷ Global constants3100.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
PNG images were not found in this plugin