83% oik-weight-zone-shipping

Code Review | Weight zone shipping for WooCommerce

WordPress plugin Weight zone shipping for WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: oik-weight-zone-s...
  • Plugin version: 0.2.10
  • PHP version: 7.4.16
  • WordPress compatibility: 2.6+
  • WordPress version: 6.3.1
  • First release: Aug 5, 2016
  • Latest release: Nov 3, 2023
  • Number of updates: 44
  • Update frequency: every 60.1 days
  • Top authors: bobbingwide (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

2,000+ active /27,038 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼7.30ms] Passed 4 tests

Server-side resources used by Weight zone shipping for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.45 ▼0.65
Dashboard /wp-admin3.32 ▼0.0343.55 ▼10.44
Posts /wp-admin/edit.php3.37 ▲0.0147.27 ▼1.17
Add New Post /wp-admin/post-new.php5.90 ▲0.0183.85 ▼16.94
Media Library /wp-admin/upload.php3.24 ▲0.0138.25 ▲4.50

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 21 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Weight zone shipping for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲4314.17 ▼0.141.91 ▲0.3242.77 ▲5.19
Dashboard /wp-admin2,192 ▲145.51 ▼0.1684.94 ▼30.0239.93 ▼8.26
Posts /wp-admin/edit.php2,100 ▼01.97 ▼0.0242.57 ▲0.1436.30 ▼0.98
Add New Post /wp-admin/post-new.php1,526 ▼923.44 ▲0.37671.30 ▼17.0659.18 ▲6.05
Media Library /wp-admin/upload.php1,397 ▼34.21 ▼0.0296.24 ▼8.9944.24 ▲1.02

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Shipping_Method' not found in wp-content/plugins/oik-weight-zone-shipping/class-oik-weight-zone-shipping.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'OIK_Weight_Zone_Shipping' not found in wp-content/plugins/oik-weight-zone-shipping/class-oik-weight-zone-shipping-multi-rate.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/oik-weight-zone-shipping/oik-weight-zone-shipping.php:83

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (Add Shipping Method for Weight Zone), #2 (Weight Zone Settings - initial display), #3 (Weight Zone Settings - shipping rates defined), #4 (Cart totals), #5 (Checkout shipping rates)
  • Tested up to: Version not formatted correctly
You can take inspiration from this readme.txt

oik-weight-zone-shipping/oik-weight-zone-shipping.php 92% from 13 tests

"Weight zone shipping for WooCommerce" version 0.2.10's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Requires at least: Required version must match the one declared in readme.txt ("5.6" instead of "2.6")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin1,550 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP41809991,114
PO File4174202436

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity45.00
▷ Minimum class complexity43.00
▷ Maximum class complexity48.00
Average method complexity2.57
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods84
▷ Static methods11.19%
▷ Public methods84100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin