83% show-shipping-class-in-product-page

Code Review | WooCommerce Show Shipping Class in Product Page

WordPress plugin WooCommerce Show Shipping Class in Product Page scored83%from 54 tests.

About plugin

  • Plugin page: show-shipping-cla...
  • Plugin version: 1.2.0
  • PHP compatiblity: 5.6.20+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-5.9.2
  • WordPress version: 6.3.1
  • First release: Aug 19, 2020
  • Latest release: Apr 7, 2022
  • Number of updates: 39
  • Update frequency: every 15.3 days
  • Top authors: inspiredsolutions (92.31%)paulplantzos (10.26%)

Code review

54 tests

User reviews

5 reviews

Install metrics

200+ active /1,825 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

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

This is a short check of server-side resources used by WooCommerce Show Shipping Class in Product Page
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0143.66 ▲3.28
Dashboard /wp-admin3.32 ▼0.0350.72 ▼14.50
Posts /wp-admin/edit.php3.37 ▲0.0148.38 ▼2.54
Add New Post /wp-admin/post-new.php5.90 ▲0.0185.79 ▼20.77
Media Library /wp-admin/upload.php3.24 ▲0.0139.64 ▲1.45

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for WooCommerce Show Shipping Class in Product Page
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲6814.29 ▲0.111.94 ▲0.2244.00 ▲4.06
Dashboard /wp-admin2,195 ▲175.60 ▼0.0192.70 ▼11.3443.04 ▲0.19
Posts /wp-admin/edit.php2,100 ▼01.97 ▼0.0635.49 ▲1.4233.25 ▼1.14
Add New Post /wp-admin/post-new.php1,528 ▲223.26 ▲0.23673.28 ▲17.4058.91 ▼1.21
Media Library /wp-admin/upload.php1,400 ▼04.13 ▼0.07103.06 ▼12.4249.24 ▲0.17

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 50% 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 non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/show-shipping-class-in-product-page/woo-show-shipping-class-in-product-page.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Contributors: Plugin contributors not specified
The official readme.txt is a good inspiration

show-shipping-class-in-product-page/woo-show-shipping-class-in-product-page.php 85% from 13 tests

The main PHP script in "WooCommerce Show Shipping Class in Product Page" version 1.2.0 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("show-shipping-class-in-product-page.php" instead of "woo-show-shipping-class-in-product-page.php")
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes

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
Success! There were no dangerous files found in this plugin28 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2153228

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.42
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%
Functions2
▷ Named functions2100.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
PNG images were not found in this plugin