83% stidner-shipping-payson-checkout

Code Review | Woocommerce Stidner Shipping - Payson Checkout

WordPress plugin Woocommerce Stidner Shipping - Payson Checkout scored83%from 54 tests.

About plugin

  • Plugin page: stidner-shipping-...
  • Plugin version: 1.3.7
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-5.0.1
  • WordPress version: 6.3.1
  • First release: Dec 13, 2017
  • Latest release: Dec 17, 2018
  • Number of updates: 24
  • Update frequency: every 15.4 days
  • Top authors: stidner (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active /8,130 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▼0.05MB] [CPU: ▼25.03ms] Passed 4 tests

An overview of server-side resources used by Woocommerce Stidner Shipping - Payson Checkout
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.35 ▼0.1124.37 ▼21.13
Dashboard /wp-admin3.67 ▲0.3348.96 ▼21.28
Posts /wp-admin/edit.php3.77 ▲0.4244.85 ▼2.07
Add New Post /wp-admin/post-new.php5.03 ▼0.8545.14 ▼55.63
Media Library /wp-admin/upload.php3.67 ▲0.4442.75 ▲4.76

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 72 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
recovery_mode_email_last_sent
db_upgraded
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Woocommerce Stidner Shipping - Payson Checkout
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /1,419 ▼1,3423.42 ▼10.950.43 ▼2.487.81 ▼37.85
Dashboard /wp-admin1,260 ▼9171.36 ▼4.2512.63 ▼82.2633.90 ▼9.87
Posts /wp-admin/edit.php1,105 ▼9921.51 ▼0.457.17 ▼28.7627.64 ▼8.13
Add New Post /wp-admin/post-new.php45 ▼1,4810.42 ▼22.640.11 ▼634.609.99 ▼41.22
Media Library /wp-admin/upload.php1,399 ▼14.09 ▼0.08119.15 ▲12.9163.28 ▲17.04

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
You still need to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • recovery_mode_email_last_sent
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts

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
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
Please fix the following items
  • 18× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Stidner\\Api\\Stidner\\Objects\\AbstractObject' not found in wp-content/plugins/stidner-shipping-payson-checkout/lib/src/Api/Stidner/Objects/Item.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Stidner\\Config' not found in wp-content/plugins/stidner-shipping-payson-checkout/lib/src/Init.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Stidner\\Api\\Stidner\\Objects\\AbstractObject' not found in wp-content/plugins/stidner-shipping-payson-checkout/lib/src/Api/Stidner/Objects/TrackingEvent.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Stidner\\Api\\Stidner\\Objects\\AbstractObject' not found in wp-content/plugins/stidner-shipping-payson-checkout/lib/src/Api/Stidner/Objects/UserGrant.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Stidner\\Api\\Stidner\\Objects\\AbstractObject' not found in wp-content/plugins/stidner-shipping-payson-checkout/lib/src/Api/Stidner/Objects/ServicePoint.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Stidner\\Api\\Stidner\\Objects\\AbstractObject' not found in wp-content/plugins/stidner-shipping-payson-checkout/lib/src/Api/Stidner/Objects/OrderProducts.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Stidner\\Api\\Stidner\\Objects\\AbstractObject' not found in wp-content/plugins/stidner-shipping-payson-checkout/lib/src/Api/Stidner/Objects/Marketplace.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Shipping_Method' not found in wp-content/plugins/stidner-shipping-payson-checkout/lib/src/Woocommerce/Shipping.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Stidner\\Api\\Stidner\\Objects\\AbstractObject' not found in wp-content/plugins/stidner-shipping-payson-checkout/lib/src/Api/Stidner/Objects/Agreement.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Stidner\\Api\\Stidner\\Objects\\AbstractObject' not found in wp-content/plugins/stidner-shipping-payson-checkout/lib/src/Api/Stidner/Objects/Package.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Requires php: Version not formatted correctly
  • Contributors: Plugin contributors field is missing
You can look at the official readme.txt

stidner-shipping-payson-checkout/stidner.php 77% from 13 tests

The primary PHP file in "Woocommerce Stidner Shipping - Payson Checkout" version 1.3.7 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("stidner-shipping-payson-checkout.php" instead of "stidner.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Description: Please don't use more than 140 characters for the plugin description (currently 172 characters long)

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
Everything looks great! No dangerous files found in this plugin6,152 lines of code in 67 files:
LanguageFilesBlank linesComment linesLines of code
PHP581,4952,9845,383
PO File2239345593
JavaScript193136
CSS24019
JSON20019
SVG2002

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity9.38
▷ Minimum class complexity1.00
▷ Maximum class complexity110.00
Average method complexity1.88
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces8
Interfaces0
Traits0
Classes48
▷ Abstract classes36.25%
▷ Concrete classes4593.75%
▷ Final classes00.00%
Methods453
▷ Static methods7416.34%
▷ Public methods40689.62%
▷ Protected methods20.44%
▷ Private methods459.93%
Functions12
▷ Named functions216.67%
▷ Anonymous functions1083.33%
Constants49
▷ Global constants36.12%
▷ Class constants4693.88%
▷ Public constants46100.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