84% hookmeup

Code Review | WooCommerce HookMeUp

WordPress plugin WooCommerce HookMeUp scored84%from 54 tests.

About plugin

  • Plugin page: hookmeup
  • Plugin version: 2.3
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2.2
  • WordPress version: 6.3.1
  • First release: Jun 19, 2018
  • Latest release: Aug 7, 2023
  • Number of updates: 78
  • Update frequency: every 24.0 days
  • Top authors: getbowtied (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

10,000+ active /270,208 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
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼1.04ms] Passed 4 tests

An overview of server-side resources used by WooCommerce HookMeUp
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0239.38 ▲0.12
Dashboard /wp-admin3.33 ▲0.0350.75 ▲1.22
Posts /wp-admin/edit.php3.38 ▲0.0246.77 ▼7.14
Add New Post /wp-admin/post-new.php5.91 ▲0.0293.09 ▲3.14
Media Library /wp-admin/upload.php3.26 ▲0.0236.74 ▲1.65

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 31 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

WooCommerce HookMeUp: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲6013.56 ▼0.801.71 ▲0.1243.34 ▲4.66
Dashboard /wp-admin2,215 ▲295.88 ▲0.94102.29 ▼18.9539.70 ▼6.26
Posts /wp-admin/edit.php2,095 ▲62.02 ▲0.0034.74 ▼8.1135.16 ▼1.25
Add New Post /wp-admin/post-new.php1,520 ▼2217.62 ▼0.72595.76 ▼26.1950.15 ▼2.17
Media Library /wp-admin/upload.php1,394 ▲124.19 ▼0.0495.03 ▼6.3840.60 ▼2.13

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 22× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/hookmeup/includes/customizer/class/class-hmu-info.php on line 9
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/hookmeup/includes/customizer/class/class-hmu-editor.php on line 9
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/hookmeup/includes/customizer/class/class-hmu-toggle.php on line 9
    • > PHP Warning
      include(ABSPATHWPINC/class-wp-customize-control.php): failed to open stream: No such file or directory in wp-content/plugins/hookmeup/includes/customizer/class/class-hmu-editor.php on line 9
    • > PHP Warning
      Use of undefined constant WPINC - assumed 'WPINC' (this will throw an Error in a future version of PHP) in wp-content/plugins/hookmeup/includes/customizer/class/class-hmu-editor.php on line 9
    • > PHP Warning
      Use of undefined constant WP_CONTENT_DIR - assumed 'WP_CONTENT_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/hookmeup/includes/appsero/src/Client.php on line 194
    • > PHP Warning
      include(ABSPATHWPINC/class-wp-customize-control.php): failed to open stream: No such file or directory in wp-content/plugins/hookmeup/includes/customizer/class/class-hmu-toggle.php on line 9
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Customize_Control' not found in wp-content/plugins/hookmeup/includes/customizer/class/class-hmu-collapsible.php:15
    • > PHP Warning
      include(): Failed opening 'ABSPATHWPINC/class-wp-customize-control.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/hookmeup/includes/customizer/class/class-hmu-editor.php on line 9
    • > PHP Warning
      include(): Failed opening 'ABSPATHWPINC/class-wp-customize-control.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/hookmeup/includes/customizer/class/class-hmu-collapsible.php on line 9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: theme, woocommerce, templates, hooks, customize

hookmeup/hookmeup.php 92% from 13 tests

The main file in "WooCommerce HookMeUp" v. 2.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Description: Keep the plugin description shorter than 140 characters (currently 437 characters long)

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
Everything looks great! No dangerous files found in this plugin3,585 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
PHP185951,2532,561
CSS3100536
Sass1460298
JavaScript4549129
PO File1151561

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity17.33
▷ Minimum class complexity1.00
▷ Maximum class complexity86.00
Average method complexity2.53
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes15
▷ Abstract classes00.00%
▷ Concrete classes15100.00%
▷ Final classes00.00%
Methods155
▷ Static methods21.29%
▷ Public methods10467.10%
▷ Protected methods1811.61%
▷ Private methods3321.29%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants4
▷ Global constants125.00%
▷ Class constants375.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected