89% bluex-for-woocommerce

Code Review | Plugin BlueX for WooCommerce

WordPress plugin Plugin BlueX for WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: bluex-for-woocomm...
  • Plugin version: 2.0.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Dec 19, 2022
  • Latest release: Nov 24, 2023
  • Number of updates: 26
  • Update frequency: every 13.2 days
  • Top authors: soporteblue (100%)

Code review

54 tests

User reviews

1 review

Install metrics

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

Server metrics [RAM: ▲0.03MB] [CPU: ▼5.33ms] Passed 4 tests

A check of server-side resources used by Plugin BlueX for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0335.99 ▼3.15
Dashboard /wp-admin3.34 ▲0.0346.45 ▼2.57
Posts /wp-admin/edit.php3.39 ▲0.0348.74 ▲1.91
Add New Post /wp-admin/post-new.php5.92 ▲0.0483.46 ▼14.59
Media Library /wp-admin/upload.php3.26 ▲0.0334.69 ▼1.00

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 67 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Plugin BlueX for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲2814.70 ▲0.471.72 ▲0.0136.69 ▼11.08
Dashboard /wp-admin2,198 ▲215.61 ▼0.0394.04 ▼8.6143.34 ▼1.28
Posts /wp-admin/edit.php2,100 ▼01.98 ▼0.0340.01 ▲0.1836.88 ▼0.87
Add New Post /wp-admin/post-new.php1,535 ▲925.32 ▲1.68600.01 ▼88.8860.70 ▲4.62
Media Library /wp-admin/upload.php1,397 ▼34.14 ▼0.0697.41 ▼8.9841.32 ▼0.07

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 94% from 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
These attributes need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (Blue Express general settings), #2 (Blue Express custom services' settings), #3 (Blue Express shipping methods in the cart)
The official readme.txt is a good inspiration

bluex-for-woocommerce/woocommerce-bluex.php 69% from 13 tests

The main file in "Plugin BlueX for WooCommerce" v. 2.0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("bluex-for-woocommerce.php" instead of "woocommerce-bluex.php")
  • Requires at least: Required version must match the one declared in readme.txt ("4.5" instead of "3.0")
  • Domain Path: The domain path folder does not exist ("/languages")
  • 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 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin4,685 lines of code in 63 files:
LanguageFilesBlank linesComment linesLines of code
PHP488512,1304,234
JavaScript1270122396
CSS211349
SVG1006

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity10.68
▷ Minimum class complexity1.00
▷ Maximum class complexity59.00
Average method complexity2.49
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes37
▷ Abstract classes410.81%
▷ Concrete classes3389.19%
▷ Final classes00.00%
Methods241
▷ Static methods2510.37%
▷ Public methods17070.54%
▷ Protected methods6024.90%
▷ Private methods114.56%
Functions11
▷ Named functions1090.91%
▷ Anonymous functions19.09%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/icon.png25.39KB11.98KB▼ 52.79%