83% display-shipping-class-in-cart-woo

Code Review | WooCommerce Display Shipping Class in Cart

WordPress plugin WooCommerce Display Shipping Class in Cart scored83%from 54 tests.

About plugin

  • Plugin page: display-shipping-...
  • Plugin version: 1.1.1
  • PHP compatiblity: 5.6.20+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-5.6
  • WordPress version: 6.3.1
  • First release: Aug 29, 2020
  • Latest release: Jan 11, 2021
  • Number of updates: 12
  • Update frequency: every 11.3 days
  • Top authors: inspiredsolutions (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /757 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
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by WooCommerce Display Shipping Class in Cart
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.73 ▼9.34
Dashboard /wp-admin3.31 ▼0.0349.18 ▼16.06
Posts /wp-admin/edit.php3.36 ▲0.0149.03 ▼13.93
Add New Post /wp-admin/post-new.php5.89 ▲0.0185.43 ▼20.53
Media Library /wp-admin/upload.php3.23 ▲0.0136.98 ▲0.13

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

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

Browser metrics Passed 4 tests

Checking browser requirements for WooCommerce Display Shipping Class in Cart
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲5414.69 ▲0.421.71 ▼0.0239.61 ▼0.46
Dashboard /wp-admin2,195 ▲185.63 ▼0.0291.66 ▲4.3539.78 ▼3.18
Posts /wp-admin/edit.php2,100 ▼02.06 ▲0.0940.87 ▲2.1235.28 ▼1.44
Add New Post /wp-admin/post-new.php1,526 ▼023.35 ▲0.15680.67 ▼23.8853.57 ▼1.63
Media Library /wp-admin/upload.php1,400 ▼04.24 ▲0.00100.35 ▲3.2643.49 ▼4.05

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/display-shipping-class-in-cart-woo/woo-display-shipping-class-in-cart.php

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

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Contributors: Plugin contributors field is missing
You can look at the official readme.txt

display-shipping-class-in-cart-woo/woo-display-shipping-class-in-cart.php 85% from 13 tests

The principal PHP file in "WooCommerce Display Shipping Class in Cart" v. 1.1.1 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("display-shipping-class-in-cart-woo.php" instead of "woo-display-shipping-class-in-cart.php")
  • Text Domain: The text domain name should consist of only dashes and lowercase characters

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected18 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2112818

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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 were not PNG files found in your plugin