78% omniship-rates-and-shipping-for-woocommerce

Code Review | OmniShip Rates and Shipping for WooCommerce

WordPress plugin OmniShip Rates and Shipping for WooCommerce scored 78% from 54 tests.

About plugin

  • Plugin page: omniship-rates-an...
  • Plugin version: 1.1.9
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.5
  • WordPress version: 6.3.1
  • First release: Sep 25, 2020
  • Latest release: Nov 10, 2020
  • Number of updates: 12
  • Update frequency: every 3.8 days
  • Top authors: transportlogic (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 466 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼5.38ms] Passed 4 tests

An overview of server-side resources used by OmniShip Rates and Shipping for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0738.52 ▼4.06
Dashboard /wp-admin3.38 ▲0.0847.55 ▼4.62
Posts /wp-admin/edit.php3.44 ▲0.0845.34 ▼3.16
Add New Post /wp-admin/post-new.php5.96 ▲0.0883.73 ▼9.68
Media Library /wp-admin/upload.php3.31 ▲0.0832.69 ▼2.89

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for OmniShip Rates and Shipping for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,821 ▲8613.24 ▼1.001.60 ▼0.3239.30 ▼3.11
Dashboard /wp-admin2,227 ▲505.86 ▲0.99101.06 ▼21.8985.39 ▲38.52
Posts /wp-admin/edit.php2,110 ▲211.99 ▼0.0735.21 ▼1.0531.79 ▼5.20
Add New Post /wp-admin/post-new.php1,541 ▲2718.46 ▲0.85726.92 ▲38.0666.27 ▲10.56
Media Library /wp-admin/upload.php1,411 ▲264.20 ▼0.0195.99 ▼7.8178.24 ▲33.48

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
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

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

SRP 0% 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
Please take a closer look at the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/omniship-rates-and-shipping-for-woocommerce/templates/style.php
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/omniship-rates-and-shipping-for-woocommerce/templates/includeBillingAddressArea.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/omniship-rates-and-shipping-for-woocommerce/templates/includeShippingAddressArea.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/omniship-rates-and-shipping-for-woocommerce/omniship-woo.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/omniship-rates-and-shipping-for-woocommerce/templates/settingsPage.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/omniship-rates-and-shipping-for-woocommerce/templates/includeCheckout.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% 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: These screenshots require images: #1 (Easily choose box dimensions and weights.), #2 (Generate label inside WooCommerce with a single click.), #3 (Print labels inside WooCommerce.)
  • Donate link: Invalid URI ("")
You can look at the official readme.txt

omniship-rates-and-shipping-for-woocommerce/omniship-woo.php 92% from 13 tests

The principal PHP file in "OmniShip Rates and Shipping for WooCommerce" v. 1.1.9 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("omniship-rates-and-shipping-for-woocommerce.php" instead of "omniship-woo.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin676 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP614353676

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity2.67
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions787.50%
▷ Anonymous functions112.50%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/omnishipLogo.png35.48KB10.79KB▼ 69.60%