83% bse-kronosexpress-shipping-woocommerce

Code Review | Kronos Express Shipping for WooCommerce

WordPress plugin Kronos Express Shipping for WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: bse-kronosexpress...
  • Plugin version: 1.0.15
  • PHP version: 7.4.16
  • WordPress compatibility: 2.6.14-5.9.3
  • WordPress version: 6.3.1
  • First release: Nov 15, 2019
  • Latest release: May 23, 2022
  • Number of updates: 30
  • Update frequency: every 30.7 days
  • Top authors: bseltd (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

30+ active /1,784 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.24MB] [CPU: ▼8.77ms] Passed 4 tests

Server-side resources used by Kronos Express Shipping for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.72 ▲0.2534.41 ▼5.71
Dashboard /wp-admin3.56 ▲0.2146.73 ▼16.03
Posts /wp-admin/edit.php3.67 ▲0.3245.23 ▲1.00
Add New Post /wp-admin/post-new.php6.14 ▲0.2579.47 ▼14.34
Media Library /wp-admin/upload.php3.48 ▲0.2535.63 ▲1.50

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

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

Browser metrics Passed 4 tests

Kronos Express Shipping for WooCommerce: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲6814.32 ▼0.032.21 ▲0.5237.81 ▼5.46
Dashboard /wp-admin2,195 ▲155.57 ▼0.0382.86 ▼11.1236.69 ▼7.02
Posts /wp-admin/edit.php2,100 ▼02.02 ▲0.0134.44 ▼2.9232.46 ▼4.27
Add New Post /wp-admin/post-new.php1,535 ▲718.27 ▼4.92607.35 ▼72.7466.82 ▲15.63
Media Library /wp-admin/upload.php1,403 ▲64.15 ▼0.0495.41 ▼3.5642.95 ▲1.40

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
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

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
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Shipping_Method' not found in wp-content/plugins/bse-kronosexpress-shipping-woocommerce/kronosexpress_wc_shipping_method.php:3

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% 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
These attributes need your attention: The official readme.txt is a good inspiration

bse-kronosexpress-shipping-woocommerce/kronosexpress-shipping-woocommerce.php 85% from 13 tests

The entry point to "Kronos Express Shipping for WooCommerce" version 1.0.15 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("bse-kronosexpress-shipping-woocommerce.php" instead of "kronosexpress-shipping-woocommerce.php")
  • Requires at least: The required version number must match the one declared in readme.txt ("4.0" instead of "2.6.14")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin3,587 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP41851832,603
JavaScript117465762
CSS31213111
PO File1490111

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity20.78
▷ Minimum class complexity1.00
▷ Maximum class complexity45.00
Average method complexity5.24
▷ Minimum method complexity1.00
▷ Maximum method complexity33.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods42
▷ Static methods24.76%
▷ Public methods42100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions32
▷ Named functions3196.88%
▷ Anonymous functions13.12%
Constants0
▷ Global constants00.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
No PNG images were found in this plugin