89% woocommerce-extra-fee-option

Code Review | TT Extra Fee Option for WooCommerce

WordPress plugin TT Extra Fee Option for WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: woocommerce-extra...
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6.1-6.1.1
  • WordPress version: 6.3.1
  • First release: Sep 9, 2013
  • Latest release: Feb 15, 2023
  • Number of updates: 25
  • Update frequency: every 137.8 days
  • Top authors: terrytsang (100%)

Code review

54 tests

User reviews

16 reviews

Install metrics

2,000+ active /33,959 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.05MB] [CPU: ▼4.42ms] Passed 4 tests

An overview of server-side resources used by TT Extra Fee Option for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0543.45 ▼2.90
Dashboard /wp-admin3.35 ▲0.0552.26 ▲4.00
Posts /wp-admin/edit.php3.41 ▲0.0549.66 ▼4.63
Add New Post /wp-admin/post-new.php5.94 ▲0.0587.90 ▼12.86
Media Library /wp-admin/upload.php3.28 ▲0.0538.35 ▲2.71

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

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

Browser metrics Passed 4 tests

TT Extra Fee Option for WooCommerce: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.78 ▲0.352.01 ▲0.2145.17 ▼0.66
Dashboard /wp-admin2,198 ▲215.63 ▼0.0283.18 ▼7.0741.67 ▲0.40
Posts /wp-admin/edit.php2,100 ▼01.97 ▼0.0035.18 ▼8.1831.64 ▼4.56
Add New Post /wp-admin/post-new.php1,528 ▲223.32 ▲0.13668.14 ▼42.1859.22 ▼1.33
Media Library /wp-admin/upload.php1,403 ▲34.10 ▼0.1298.40 ▼5.3945.45 ▼1.32

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
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts

Smoke tests Passed 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 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Plugin Name: Please specify the plugin name on the first line ( === woocommerce-extra-fee-option === )
  • Screenshots: These screenshots require images: #1 ([screenhot-1.png] Screenshot Admin WooCommerce Settings - TT Extra Fee Option), #2 ([screenhot-2.png] Screenshot Frontend WooCommerce - Cart page), #3 ([screenhot-3.png] Screenshot Frontend WooCommerce - Checkout page)
Please take inspiration from this readme.txt

woocommerce-extra-fee-option/wc-extra-fee-option.php 92% from 13 tests

"TT Extra Fee Option for WooCommerce" version 1.1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("woocommerce-extra-fee-option.php" instead of "wc-extra-fee-option.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected552 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP17673285
CSS189163
PO File23233104

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity29.00
▷ Minimum class complexity29.00
▷ Maximum class complexity29.00
Average method complexity4.50
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
14 PNG files occupy 0.61MB with 0.33MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/icon-woocommerce-product-badge.png8.45KB4.08KB▼ 51.70%
assets/images/icon-woocommerce-donation-checkout.png9.24KB4.20KB▼ 54.56%
assets/images/icon-woocommerce-add-to-cart-buy-now.png8.33KB3.56KB▼ 57.30%
logo-terrytsang.png9.73KB4.28KB▼ 56.03%
assets/images/icon-woocommerce-product-catalog.png6.78KB3.49KB▼ 48.47%