83% hookywoo

Code Review | Hook Customizer for WooCommerce

WordPress plugin Hook Customizer for WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: hookywoo
  • Plugin version: 2.0.3
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.0
  • WordPress version: 6.3.1
  • First release: Sep 14, 2017
  • Latest release: Sep 12, 2022
  • Number of updates: 71
  • Update frequency: every 27.3 days
  • Top authors: jrobie23 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,496 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
Installer ran successfully

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

A check of server-side resources used by Hook Customizer for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0036.26 ▼3.12
Dashboard /wp-admin3.31 ▲0.0145.57 ▼0.84
Posts /wp-admin/edit.php3.36 ▲0.0047.06 ▲0.96
Add New Post /wp-admin/post-new.php5.89 ▲0.0087.55 ▼7.47
Media Library /wp-admin/upload.php3.23 ▲0.0033.33 ▼2.64

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Hook Customizer for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲5413.59 ▼0.691.99 ▲0.0738.10 ▼1.76
Dashboard /wp-admin2,206 ▲144.86 ▼0.09110.33 ▲1.7942.44 ▲1.08
Posts /wp-admin/edit.php2,086 ▼62.01 ▼0.0137.06 ▼1.9534.80 ▲0.98
Add New Post /wp-admin/post-new.php1,542 ▲2218.08 ▼5.08633.30 ▲6.6546.14 ▼4.18
Media Library /wp-admin/upload.php1,391 ▼04.29 ▲0.2497.22 ▼1.8840.06 ▼5.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
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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
Please fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_settings_field() in wp-content/plugins/hookywoo/includes/checkout-page-fields.php:173
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_settings_field() in wp-content/plugins/hookywoo/includes/cart-page-fields.php:117

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

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
Please fix the following attributes:
  • Screenshots: No descriptions were found for these screenshots #1, #2, #3, #4, #5 in hookywoo/assets to your readme.txt
The official readme.txt might help

hookywoo/hookywoo-hooks-customizer.php 85% from 13 tests

"Hook Customizer for WooCommerce" version 2.0.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Requires PHP: Required version must match the one declared in readme.txt ("7.0" instead of "7.2")
  • Main file name: Name the main plugin file the same as the plugin slug ("hookywoo.php" instead of "hookywoo-hooks-customizer.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
No dangerous file extensions were detected1,120 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP1019311,038
Markdown118055
CSS13427

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity11.00
▷ Minimum class complexity4.00
▷ Maximum class complexity18.00
Average method complexity2.25
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods17100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
5 PNG files occupy 0.86MB with 0.63MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/cart.png118.47KB33.80KB▼ 71.47%
images/single-product.png319.67KB79.14KB▼ 75.24%
images/checkout1.png132.35KB39.18KB▼ 70.40%
images/shop.png246.42KB63.73KB▼ 74.14%
images/checkout2.png65.78KB18.71KB▼ 71.56%