78% citrino-shipping

Code Review | Citrino Shipping for WooCommerce

WordPress plugin Citrino Shipping for WooCommerce scored78%from 54 tests.

About plugin

  • Plugin page: citrino-shipping
  • Plugin version: 1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4.1-5.4.1
  • WordPress version: 6.3.1
  • First release: Jun 25, 2020
  • Latest release: Jun 25, 2020
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: citrinocourier (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /412 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼12.34ms] Passed 4 tests

This is a short check of server-side resources used by Citrino Shipping for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.18 ▼0.36
Dashboard /wp-admin3.31 ▼0.0446.96 ▼20.32
Posts /wp-admin/edit.php3.36 ▲0.0046.33 ▼8.82
Add New Post /wp-admin/post-new.php5.89 ▲0.0085.06 ▼16.99
Media Library /wp-admin/upload.php3.23 ▲0.0035.51 ▼3.23

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Citrino Shipping for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.72 ▲0.441.89 ▼0.1241.70 ▲0.48
Dashboard /wp-admin2,195 ▲155.62 ▼0.0693.33 ▲3.6039.29 ▼4.86
Posts /wp-admin/edit.php2,100 ▼02.03 ▼0.0033.59 ▼0.8534.80 ▼3.79
Add New Post /wp-admin/post-new.php1,526 ▼1123.05 ▲4.73691.24 ▲57.3852.91 ▼14.61
Media Library /wp-admin/upload.php1,400 ▼04.20 ▲0.02110.90 ▼0.9651.75 ▲7.67

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/citrino-shipping/citrino-shipping-for-woocommerce-canada-post.php
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Shipping_Method' not found in wp-content/plugins/citrino-shipping/citrino-shipping-for-woocommerce-shipping-method.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% 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: The official readme.txt might help

citrino-shipping/citrino.php 92% from 13 tests

The entry point to "Citrino Shipping for WooCommerce" version 1.0 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("citrino-shipping.php" instead of "citrino.php")

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
There were no executable files found in this plugin193 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP33514193

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity10.50
▷ Minimum class complexity9.00
▷ Maximum class complexity12.00
Average method complexity4.17
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods466.67%
▷ Protected methods00.00%
▷ Private methods233.33%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin