89% woo-remove-shipping-from-cart-totals

Code Review | WooCommerce Remove Shipping from Cart Totals

WordPress plugin WooCommerce Remove Shipping from Cart Totals scored89%from 54 tests.

About plugin

  • Plugin page: woo-remove-shippi...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-5.5.1
  • WordPress version: 6.3.1
  • First release: Jul 14, 2019
  • Latest release: Sep 30, 2020
  • Number of updates: 3
  • Update frequency: every 147.7 days
  • Top authors: affuxo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /718 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
Installer ran successfully

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

Analyzing server-side resources used by WooCommerce Remove Shipping from Cart Totals
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.58 ▲2.17
Dashboard /wp-admin3.32 ▼0.0346.77 ▼8.62
Posts /wp-admin/edit.php3.37 ▲0.0147.65 ▲3.99
Add New Post /wp-admin/post-new.php5.90 ▲0.0189.71 ▼7.16
Media Library /wp-admin/upload.php3.24 ▲0.0036.42 ▲5.22

Server storage [IO: ▲0.02MB] [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
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for WooCommerce Remove Shipping from Cart Totals
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲7313.15 ▼1.231.79 ▼0.2743.44 ▼12.57
Dashboard /wp-admin2,214 ▲264.85 ▼0.06107.51 ▲1.0339.97 ▼6.93
Posts /wp-admin/edit.php2,096 ▲72.00 ▼0.0239.99 ▲3.0136.85 ▲2.04
Add New Post /wp-admin/post-new.php1,545 ▲3123.20 ▲5.57628.83 ▼100.0977.22 ▲21.39
Media Library /wp-admin/upload.php1,393 ▲24.20 ▼0.1798.69 ▼5.3944.02 ▲1.09

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Donate link: Invalid URI found ("N/A")
You can take inspiration from this readme.txt

woo-remove-shipping-from-cart-totals/woocommerce-remove-shipping-from-cart-totals.php 85% from 13 tests

"WooCommerce Remove Shipping from Cart Totals" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: The principal plugin file should be the same as the plugin slug ("woo-remove-shipping-from-cart-totals.php" instead of "woocommerce-remove-shipping-from-cart-totals.php")

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
There were no executable files found in this plugin22 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP251822

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.43
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%
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

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot.PNG21.32KB8.13KB▼ 61.85%