83% oik-weightcountry-shipping

Code Review | Weight/Country Shipping for WooCommerce

WordPress plugin Weight/Country Shipping for WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: oik-weightcountry...
  • Plugin version: 1.4.3
  • PHP version: 7.4.16
  • WordPress compatibility: 2.6+
  • WordPress version: 6.3.1
  • First release: Mar 29, 2014
  • Latest release: Oct 21, 2023
  • Number of updates: 53
  • Update frequency: every 65.9 days
  • Top authors: bobbingwide (100%)

Code review

54 tests

User reviews

19 reviews

Install metrics

1,000+ active /52,944 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.05MB] [CPU: ▼3.77ms] Passed 4 tests

Analyzing server-side resources used by Weight/Country Shipping for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0540.68 ▲0.97
Dashboard /wp-admin3.35 ▲0.0545.00 ▼5.61
Posts /wp-admin/edit.php3.40 ▲0.0544.75 ▼5.96
Add New Post /wp-admin/post-new.php5.93 ▲0.0582.73 ▼4.48
Media Library /wp-admin/upload.php3.27 ▲0.0536.34 ▲1.91

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Weight/Country Shipping for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.28 ▼0.071.66 ▼0.1042.66 ▼4.59
Dashboard /wp-admin2,198 ▲275.66 ▲0.0583.29 ▼17.9537.84 ▼6.34
Posts /wp-admin/edit.php2,100 ▲31.94 ▼0.0934.56 ▼3.2634.89 ▲0.70
Add New Post /wp-admin/post-new.php1,526 ▼222.97 ▼0.18657.23 ▼0.2370.35 ▲20.74
Media Library /wp-admin/upload.php1,400 ▼34.17 ▲0.0194.39 ▼1.7840.08 ▼5.07

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded

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
The following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/oik-weightcountry-shipping/oik-weightcountry-shipping.php:418

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 90% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Weight and Country shipping settings part one), #2 (Weight and Country shipping settings part two), #3 (WooCommerce Checkout shipping rate), #4 (Enable Shipping Debug Mode when modifying rates)
  • Tested up to: Invalid version format
Please take inspiration from this readme.txt

oik-weightcountry-shipping/oik-weightcountry-shipping.php 92% from 13 tests

The primary PHP file in "Weight/Country Shipping for WooCommerce" version 1.4.3 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("3.9" instead of "2.6")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin484 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP143138245
PO File38081239

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity39.00
▷ Minimum class complexity39.00
▷ Maximum class complexity39.00
Average method complexity4.17
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
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