73% shipping-rates-by-zipcode-woocommerce

Code Review | Shipping Rates by ZipCode for woocommerce

WordPress plugin Shipping Rates by ZipCode for woocommerce scored 73% from 54 tests.

About plugin

  • Plugin page: shipping-rates-by...
  • Plugin version: 1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.9
  • WordPress version: 6.3.1
  • First release: Feb 12, 2022
  • Latest release: Feb 12, 2022
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: logiceverest (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 687 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼1.56ms] Passed 4 tests

Server-side resources used by Shipping Rates by ZipCode for woocommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0335.37 ▼2.54
Dashboard /wp-admin3.33 ▲0.0343.89 ▼2.18
Posts /wp-admin/edit.php3.39 ▲0.0347.99 ▼1.44
Add New Post /wp-admin/post-new.php5.93 ▲0.0594.86 ▼0.06
Media Library /wp-admin/upload.php3.26 ▲0.0335.15 ▲1.20

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 4 new files
Database: 1 new table, 6 new options
New tables
wp_wczipfee_zipcodes
New WordPress options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Shipping Rates by ZipCode for woocommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,906 ▲17113.53 ▼1.077.61 ▲5.9543.84 ▼2.31
Dashboard /wp-admin2,205 ▲175.14 ▼0.76109.30 ▲4.8839.79 ▼0.84
Posts /wp-admin/edit.php2,091 ▲22.03 ▲0.0539.67 ▲3.7835.20 ▼0.48
Add New Post /wp-admin/post-new.php1,533 ▼1123.23 ▲5.11596.82 ▼8.2448.44 ▼0.88
Media Library /wp-admin/upload.php1,393 ▲84.21 ▼0.0995.99 ▼4.0541.88 ▼1.89

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie tables detected upon uninstall: 1 table
    • wp_wczipfee_zipcodes
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • 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
Everything seems fine, however this is by no means an exhaustive test

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× 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/shipping-rates-by-zipcode-woocommerce/shipping-method-class.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Donate link: Please fix this invalid URI: ""
The official readme.txt might help

shipping-rates-by-zipcode-woocommerce/shipping-by-zipcode.php 77% from 13 tests

The principal PHP file in "Shipping Rates by ZipCode for woocommerce" v. 1.0 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("shipping-rates-by-zipcode-woocommerce.php" instead of "shipping-by-zipcode.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Domain Path: The domain path folder does not exist ("/lang")

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
Success! There were no dangerous files found in this plugin309 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP297113289
JavaScript16020

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity12.00
▷ Minimum class complexity12.00
▷ Maximum class complexity12.00
Average method complexity1.92
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods24
▷ Static methods14.17%
▷ Public methods2083.33%
▷ Protected methods00.00%
▷ Private methods416.67%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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 files were detected