89% wpc-badge-management

Code Review | WPC Badge Management for WooCommerce

WordPress plugin WPC Badge Management for WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: wpc-badge-management
  • Plugin version: 2.3.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.4
  • WordPress version: 6.3.1
  • First release: Mar 30, 2022
  • Latest release: Nov 25, 2023
  • Number of updates: 44
  • Update frequency: every 13.8 days
  • Top authors: wpclever (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

1,000+ active /19,495 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.50MB] [CPU: ▼1.39ms] Passed 4 tests

Analyzing server-side resources used by WPC Badge Management for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.94 ▲0.4836.09 ▼5.52
Dashboard /wp-admin3.84 ▲0.5448.86 ▼2.48
Posts /wp-admin/edit.php3.89 ▲0.5448.96 ▲2.54
Add New Post /wp-admin/post-new.php6.38 ▲0.4993.74 ▼0.10
Media Library /wp-admin/upload.php3.70 ▲0.4738.67 ▲6.81
About /wp-admin/admin.php?page=wpclever3.6731.67
Essential Kit /wp-admin/admin.php?page=wpclever-kit3.6733.37

Server storage [IO: ▲4.50MB] [DB: ▲0.02MB] Passed 3 tests

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for WPC Badge Management for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,867 ▲10514.67 ▲0.321.52 ▼0.3037.08 ▼6.93
Dashboard /wp-admin2,257 ▲795.60 ▼0.0887.52 ▼24.2987.66 ▲40.46
Posts /wp-admin/edit.php2,182 ▲822.00 ▼0.0738.61 ▲2.7334.99 ▼3.23
Add New Post /wp-admin/post-new.php1,598 ▲7223.28 ▼0.23739.74 ▲123.6675.08 ▲19.66
Media Library /wp-admin/upload.php1,471 ▲684.23 ▲0.0597.42 ▼2.6977.42 ▲34.00
About /wp-admin/admin.php?page=wpclever1,4052.1132.5832.55
Essential Kit /wp-admin/admin.php?page=wpclever-kit5,7322.1332.6765.10

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention: You can look at the official readme.txt

wpc-badge-management/wpc-badge-management.php 92% from 13 tests

The main PHP script in "WPC Badge Management for WooCommerce" version 2.3.6 is automatically included on every request by WordPress
It is important to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 175 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected32,241 lines of code in 48 files:
LanguageFilesBlank linesComment linesLines of code
CSS245,01724316,457
SVG141912,628
PHP6418522,692
JavaScript48816464

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity82.40
▷ Minimum class complexity1.00
▷ Maximum class complexity307.00
Average method complexity5.07
▷ Minimum method complexity1.00
▷ Maximum method complexity44.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods100
▷ Static methods44.00%
▷ Public methods9595.00%
▷ Protected methods00.00%
▷ Private methods55.00%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
Constants10
▷ Global constants10100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
23 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/style/17.png2.03KB1.80KB▼ 11.09%
assets/images/style/18.png1.86KB1.72KB▼ 7.56%
assets/images/style/09.png0.83KB0.55KB▼ 34.62%
assets/images/style/07.png0.66KB0.30KB▼ 54.81%
assets/images/style/13.png0.72KB0.48KB▼ 33.56%