89% woo-better-usability

Code Review | WooCommerce Better Usability

WordPress plugin WooCommerce Better Usability scored89%from 54 tests.

About plugin

  • Plugin page: woo-better-usability
  • Plugin version: 1.0.55
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1
  • WordPress version: 6.3.1
  • First release: Oct 9, 2017
  • Latest release: Jan 11, 2023
  • Number of updates: 82
  • Update frequency: every 23.4 days
  • Top authors: moiseh (100%)

Code review

54 tests

User reviews

21 reviews

Install metrics

1,000+ active /56,191 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼5.91ms] Passed 4 tests

A check of server-side resources used by WooCommerce Better Usability
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1437.99 ▼1.55
Dashboard /wp-admin3.44 ▲0.0946.61 ▼15.33
Posts /wp-admin/edit.php3.49 ▲0.1346.61 ▲0.55
Add New Post /wp-admin/post-new.php5.95 ▲0.0783.79 ▼7.30
Media Library /wp-admin/upload.php3.30 ▲0.0737.38 ▲1.15

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 27 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
wbu_notices
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for WooCommerce Better Usability
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲1814.58 ▲0.381.64 ▼0.1843.81 ▲5.03
Dashboard /wp-admin2,195 ▲145.57 ▼0.1587.90 ▼14.8835.49 ▼4.85
Posts /wp-admin/edit.php2,100 ▼02.01 ▲0.0336.14 ▼1.0336.27 ▲1.18
Add New Post /wp-admin/post-new.php1,535 ▲723.13 ▲0.17625.15 ▲11.6454.52 ▼18.42
Media Library /wp-admin/upload.php1,400 ▼34.20 ▲0.0294.92 ▼8.5640.82 ▼4.57

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • wbu_notices
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget

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
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
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 just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes: You can take inspiration from this readme.txt

woo-better-usability/wbulite.php 85% from 13 tests

This is the main PHP file of "WooCommerce Better Usability" version 1.0.55, 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:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("4.8" instead of "5.0")
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("woo-better-usability.php" instead of "wbulite.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 plugin2,174 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP183591431,677
JavaScript211657407
CSS221090

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity24.62
▷ Minimum class complexity6.00
▷ Maximum class complexity60.00
Average method complexity2.52
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods125
▷ Static methods43.20%
▷ Public methods11793.60%
▷ Protected methods00.00%
▷ Private methods86.40%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants8
▷ Global constants675.00%
▷ Class constants225.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
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
common/assets/youtube.png0.27KB0.22KB▼ 18.25%
common/assets/alert.png0.42KB0.45KB0.00%