89% shipping-canada-post-woocommerce

Code Review | Shipping Canada Post WooCommerce

WordPress plugin Shipping Canada Post WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: shipping-canada-p...
  • Plugin version: 0.2.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.0-5.0
  • WordPress version: 6.3.1
  • First release: Dec 6, 2018
  • Latest release: Jan 2, 2019
  • Number of updates: 29
  • Update frequency: every 0.9 days
  • Top authors: defcronyke (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

20+ active /1,237 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

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

Analyzing server-side resources used by Shipping Canada Post WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0042.88 ▼0.10
Dashboard /wp-admin3.31 ▲0.0046.05 ▼5.11
Posts /wp-admin/edit.php3.36 ▲0.0050.81 ▲0.82
Add New Post /wp-admin/post-new.php5.89 ▲0.0090.96 ▼18.47
Media Library /wp-admin/upload.php3.23 ▲0.0039.16 ▲2.96

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Shipping Canada Post WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.25 ▼0.031.95 ▲0.3443.71 ▲0.96
Dashboard /wp-admin2,198 ▲185.61 ▼0.0083.00 ▼7.7938.69 ▼6.64
Posts /wp-admin/edit.php2,103 ▲32.01 ▲0.0541.56 ▲6.2136.17 ▼0.85
Add New Post /wp-admin/post-new.php1,531 ▼622.95 ▲4.85641.12 ▼6.4461.80 ▲4.93
Media Library /wp-admin/upload.php1,397 ▼34.18 ▼0.0699.01 ▼2.6644.92 ▼0.30

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

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 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Tags: Please reduce the number of tags, currently 22 tag instead of maximum 10
You can look at the official readme.txt

shipping-canada-post-woocommerce/shipping-canada-post-woocommerce.php 85% from 13 tests

The main file in "Shipping Canada Post WooCommerce" v. 0.2.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Requires at least: The required version number must match the one declared in readme.txt ("4.0.1" instead of "3.5.0")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

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
No dangerous file extensions were detected1,147 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP142982981,081
JSON14066

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity21.00
▷ Minimum class complexity10.00
▷ Maximum class complexity36.00
Average method complexity2.59
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods25
▷ Static methods312.00%
▷ Public methods25100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions30
▷ Named functions2066.67%
▷ Anonymous functions1033.33%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin