94% wc-trinicargo-shipping

Code Review | Plugin Name: Wicommerce Shipping Extension

WordPress plugin Plugin Name: Wicommerce Shipping Extension scored 94% from 54 tests.

About plugin

  • Plugin page: wc-trinicargo-shi...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.9
  • WordPress version: 5.8.1
  • First release: Dec 15, 2017
  • Latest release: Dec 15, 2017
  • Number of updates: 4
  • Update frequency: every 1.0 days
  • Top authors: icecappacino (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 438 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

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

Analyzing server-side resources used by Plugin Name: Wicommerce Shipping Extension
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.83 ▲0.1239.48 ▲16.11
Dashboard /wp-admin3.06 ▲0.0049.02 ▼3.22
Posts /wp-admin/edit.php3.11 ▲0.0048.11 ▲3.53
Add New Post /wp-admin/post-new.php5.42 ▼0.0290.29 ▼577.53
Media Library /wp-admin/upload.php3.00 ▲0.0033.00 ▲2.06

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 28 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Plugin Name: Wicommerce Shipping Extension
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲10715.83 ▲0.2811.15 ▲0.8753.39 ▲5.72
Dashboard /wp-admin2,967 ▲305.85 ▼0.09140.88 ▼7.42114.79 ▼0.46
Posts /wp-admin/edit.php2,739 ▼02.70 ▼0.0165.95 ▼3.8095.58 ▲3.11
Add New Post /wp-admin/post-new.php1,683 ▼018.49 ▼0.31374.80 ▼18.64108.20 ▼0.10
Media Library /wp-admin/upload.php1,807 ▼35.05 ▲0.00153.66 ▼10.91118.45 ▼3.89

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely 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 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/wc-trinicargo-shipping/public/partials/wc-trinicargo-shipping-public-display.php
    • > /wp-content/plugins/wc-trinicargo-shipping/admin/partials/wc-trinicargo-shipping-admin-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === Plugin Name: Wicommerce Shipping Extension === )
The official readme.txt is a good inspiration

wc-trinicargo-shipping/wc-trinicargo-shipping.php Passed 13 tests

The primary PHP file in "Plugin Name: Wicommerce Shipping Extension" version 1.0.0 is used by WordPress to initiate all plugin functionality
108 characters long description:
Shipping Extension Plugin for WooCommerce. Delivery services for Trinidad and Tobago provided by Trin-e-box.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin676 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP16196575647
JSON10019
JavaScript225310
CSS2080

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of 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.21
Average class complexity3.31
▷ Minimum class complexity1.00
▷ Maximum class complexity11.00
Average method complexity1.54
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes13
▷ Abstract classes17.69%
▷ Concrete classes1292.31%
▷ Final classes00.00%
Methods56
▷ Static methods35.36%
▷ Public methods4783.93%
▷ Protected methods23.57%
▷ Private methods712.50%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.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
There are no PNG files in this plugin