83% woocommerce-shipping-options

Code Review | WooCommerce Shipping Options

WordPress plugin WooCommerce Shipping Options scored83%from 54 tests.

About plugin

  • Plugin page: woocommerce-shipp...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: May 12, 2015
  • Latest release: May 12, 2015
  • Number of updates: 5
  • Update frequency: every 0.2 days
  • Top authors: taavi.aasver (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /7,689 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
Installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼1.57ms] Passed 4 tests

Analyzing server-side resources used by WooCommerce Shipping Options
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0637.27 ▼5.37
Dashboard /wp-admin3.36 ▲0.0649.32 ▼3.22
Posts /wp-admin/edit.php3.41 ▲0.0650.34 ▲1.83
Add New Post /wp-admin/post-new.php5.95 ▲0.0686.89 ▲0.47
Media Library /wp-admin/upload.php3.29 ▲0.0639.06 ▲4.78

Server storage [IO: ▲0.02MB] [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: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for WooCommerce Shipping Options
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.16 ▼1.141.81 ▼0.2942.18 ▼4.17
Dashboard /wp-admin2,206 ▲185.91 ▲1.02105.01 ▲0.9445.66 ▲5.19
Posts /wp-admin/edit.php2,089 ▼02.02 ▲0.0235.50 ▼4.4032.14 ▼5.36
Add New Post /wp-admin/post-new.php1,535 ▼823.36 ▲4.82664.05 ▲26.4347.71 ▼15.04
Media Library /wp-admin/upload.php1,391 ▲34.24 ▼0.01100.94 ▼3.7846.04 ▼1.34

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
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woocommerce-shipping-options/wc-shipping-options.php:458

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

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Donate link: Please fix this invalid url: "-"
  • Requires at least: The plugin version is formatted incorrectly
The official readme.txt is a good inspiration

woocommerce-shipping-options/wc-shipping-options.php 92% from 13 tests

The main file in "WooCommerce Shipping Options" v. 1.0 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: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("woocommerce-shipping-options.php" instead of "wc-shipping-options.php")

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
Everything looks great! No dangerous files found in this plugin328 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP16184328

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity39.00
▷ Minimum class complexity39.00
▷ Maximum class complexity39.00
Average method complexity3.53
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.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
There were not PNG files found in your plugin