89% woocommerce-checkout-extra-options

Code Review | WooCommerce Checkout Extra options

WordPress plugin WooCommerce Checkout Extra options scored89%from 54 tests.

About plugin

  • Plugin page: woocommerce-check...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2.1-4.2.1
  • WordPress version: 6.3.1
  • First release: Apr 15, 2015
  • Latest release: Jun 4, 2015
  • Number of updates: 18
  • Update frequency: every 3.3 days
  • Top authors: kantverma (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /2,067 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▼0.09MB] [CPU: ▼10.61ms] Passed 4 tests

Analyzing server-side resources used by WooCommerce Checkout Extra options
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.91 ▼0.5922.32 ▼14.57
Dashboard /wp-admin3.42 ▲0.0846.82 ▼1.17
Posts /wp-admin/edit.php3.45 ▲0.0651.08 ▼0.30
Add New Post /wp-admin/post-new.php6.09 ▲0.1777.19 ▼24.05
Media Library /wp-admin/upload.php3.36 ▲0.1034.55 ▼2.64

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: no files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for WooCommerce Checkout Extra options
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,456 ▼29013.26 ▼1.510.54 ▼1.0315.91 ▼22.22
Dashboard /wp-admin2,209 ▲204.87 ▼0.0799.47 ▼14.0038.87 ▼4.44
Posts /wp-admin/edit.php2,092 ▲62.04 ▲0.0539.99 ▲4.5734.65 ▲4.30
Add New Post /wp-admin/post-new.php1,514 ▼517.71 ▼5.50617.36 ▼65.4462.89 ▼1.19
Media Library /wp-admin/upload.php1,385 ▼04.28 ▼0.0399.42 ▼7.1244.58 ▼0.16

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

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:
  • Stable tag: No value
The official readme.txt is a good inspiration

woocommerce-checkout-extra-options/hs_woocommerce_option.php 85% from 13 tests

This is the main PHP file of "WooCommerce Checkout Extra options" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 156 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("woocommerce-checkout-extra-options.php" instead of "hs_woocommerce_option.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin117 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1162766
CSS16051

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.30
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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.47MB with 0.23MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-3.png401.20KB105.69KB▼ 73.66%
assets/screenshot-1.png18.15KB12.75KB▼ 29.74%
assets/screenshot-2.png63.66KB34.74KB▼ 45.42%