94% easyshipper

Code Review | EasyShipper - EasyPost Integration for WooCommerce

WordPress plugin EasyShipper - EasyPost Integration for WooCommerce scored 94% from 54 tests.

About plugin

  • Plugin page: easyshipper
  • Plugin version: 0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.6
  • WordPress version: 5.8.1
  • First release: Nov 19, 2013
  • Latest release: Apr 6, 2014
  • Number of updates: 14
  • Update frequency: every 9.9 days
  • Top authors: seanvoss (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

10+ active / 4,600 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼141.10ms] Passed 4 tests

An overview of server-side resources used by EasyShipper - EasyPost Integration for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1238.01 ▲15.91
Dashboard /wp-admin3.06 ▲0.0143.97 ▼2.67
Posts /wp-admin/edit.php3.11 ▲0.0145.96 ▼0.11
Add New Post /wp-admin/post-new.php5.42 ▼0.0189.93 ▼560.78
Media Library /wp-admin/upload.php3.01 ▲0.0033.57 ▼0.83

Server storage [IO: ▲0.32MB] [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: 44 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for EasyShipper - EasyPost Integration for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,678 ▲8216.19 ▲0.698.55 ▼0.5450.77 ▼1.19
Dashboard /wp-admin2,967 ▲335.92 ▼0.04137.95 ▼8.29113.25 ▼4.95
Posts /wp-admin/edit.php2,739 ▼02.70 ▲0.0267.10 ▲4.4686.34 ▼13.66
Add New Post /wp-admin/post-new.php1,500 ▼18318.85 ▲0.06377.94 ▼2.68110.72 ▲1.96
Media Library /wp-admin/upload.php1,810 ▲65.02 ▼0.02156.50 ▼15.47121.27 ▼3.45

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
This plugin's uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, 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
  • 34× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'EasyPost\\Resource' not found in wp-content/plugins/easyshipper/lib/easypost-php/lib/EasyPost/Rate.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'EasyPost\\Resource' not found in wp-content/plugins/easyshipper/lib/easypost-php/lib/EasyPost/Batch.php:5
    • > PHP Warning
      require_once(../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/easyshipper/lib/easypost-php/examples/scanforms.php on line 3
    • > PHP Parse error
      syntax error, unexpected 'new' (T_NEW) in wp-content/plugins/easyshipper/easypost_shipping.php on line 250
    • > PHP Fatal error
      Uncaught Error: Class 'EasyPost\\Resource' not found in wp-content/plugins/easyshipper/lib/easypost-php/lib/EasyPost/CustomsItem.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'EasyPost\\Resource' not found in wp-content/plugins/easyshipper/lib/easypost-php/lib/EasyPost/Refund.php:5
    • > PHP Warning
      require_once(../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/easyshipper/lib/easypost-php/examples/refunds.php on line 3
    • > PHP Fatal error
      Cannot use 'Object' as class name as it is reserved in wp-content/plugins/easyshipper/lib/easypost-php/lib/EasyPost/Object.php on line 5
    • > PHP Fatal error
      Uncaught Error: Class 'EasyPost\\Resource' not found in wp-content/plugins/easyshipper/lib/easypost-php/lib/EasyPost/Address.php:5
    • > PHP Fatal error
      Cannot use 'Object' as class name as it is reserved in wp-content/plugins/easyshipper/lib/easypost-php/lib/EasyPost/Object.php on line 5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: easypost, free easypost integration, woocommerce, shipping

easyshipper/easyshipper.php 92% from 13 tests

The primary PHP file in "EasyShipper - EasyPost Integration for WooCommerce" version 0.5 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Git Repository: There should be no Git repositories present in your plugin

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin2,054 lines of code in 37 files:
LanguageFilesBlank linesComment linesLines of code
PHP334741281,921
Markdown220090
JSON10030
XML12013

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity8.65
▷ Minimum class complexity1.00
▷ Maximum class complexity41.00
Average method complexity2.22
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes20
▷ Abstract classes315.00%
▷ Concrete classes1785.00%
▷ Final classes00.00%
Methods125
▷ Static methods6854.40%
▷ Public methods11592.00%
▷ Protected methods54.00%
▷ Private methods54.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin