84% hootkit

Code Review | HootKit

WordPress plugin HootKit scored84%from 54 tests.

About plugin

  • Plugin page: hootkit
  • Plugin version: 2.0.13
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Sep 13, 2018
  • Latest release: Jul 27, 2023
  • Number of updates: 71
  • Update frequency: every 25.4 days
  • Top authors: wphoot (100%)

Code review

54 tests

User reviews

20 reviews

Install metrics

10,000+ active /259,335 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲1.65MB] [CPU: ▲7.09ms] Passed 4 tests

A check of server-side resources used by HootKit
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /5.08 ▲1.6262.62 ▲22.55
Dashboard /wp-admin4.97 ▲1.6364.30 ▼2.27
Posts /wp-admin/edit.php5.02 ▲1.6760.81 ▲8.64
Add New Post /wp-admin/post-new.php7.58 ▲1.69107.55 ▼0.57
Media Library /wp-admin/upload.php4.90 ▲1.6757.63 ▲22.69
HootKit /wp-admin/options-general.php?page=hootkit4.8741.89

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 156 new files
Database: no new tables, 19 new options
New WordPress options
widget_hootkit-posts-grid
widget_hootkit-cta
widget_theysaidso_widget
widget_hootkit-posts-blocks
theysaidso_admin_options
widget_hootkit-content-grid
widget_recent-posts
widget_hootkit-posts-list
widget_hootkit-icon
widget_hootkit-content-blocks
...

Browser metrics Passed 4 tests

An overview of browser requirements for HootKit
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,927 ▲16614.05 ▼0.209.12 ▲7.2145.94 ▲5.29
Dashboard /wp-admin2,244 ▲385.08 ▼0.92108.19 ▲2.9742.53 ▼4.77
Posts /wp-admin/edit.php2,128 ▲282.29 ▲0.2737.36 ▲0.0933.42 ▼2.98
Add New Post /wp-admin/post-new.php1,548 ▲2223.29 ▲5.75688.69 ▲4.6036.04 ▼14.91
Media Library /wp-admin/upload.php1,426 ▲294.40 ▲0.17108.52 ▲3.5748.75 ▲8.47
HootKit /wp-admin/options-general.php?page=hootkit1,1311.8829.7537.03

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
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 19 options
    • widget_hootkit-slider-postimage
    • widget_hootkit-posts-grid
    • widget_hootkit-content-grid
    • widget_hootkit-announce
    • widget_hootkit-posts-blocks
    • theysaidso_admin_options
    • widget_hootkit-slider-image
    • widget_hootkit-icon
    • widget_hootkit-cover-image
    • db_upgraded
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
  • 40× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: background in wp-content/plugins/hootkit/widgets/products-ticker/view.php on line 18
    • > PHP Notice
      Undefined variable: background in wp-content/plugins/hootkit/widgets/ticker-posts/view.php on line 18
    • > PHP Notice
      Undefined variable: columns in wp-content/plugins/hootkit/widgets/post-list/view.php on line 3
    • > PHP Notice
      Undefined variable: columns in wp-content/plugins/hootkit/widgets/product-list/view.php on line 3
    • > PHP Notice
      Undefined variable: background in wp-content/plugins/hootkit/widgets/ticker-posts/view.php on line 7
    • > PHP Notice
      Undefined variable: slider_template in wp-content/plugins/hootkit/widgets/postcarousel/view-setup.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function hootkit_widget_borderclass() in wp-content/plugins/hootkit/widgets/content-posts-blocks/view.php:3
    • > PHP Notice
      Undefined variable: columns in wp-content/plugins/hootkit/widgets/post-grid/view.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function WC() in wp-content/plugins/hootkit/widgets/products-carticon/view.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_cart() in wp-content/plugins/hootkit/misc/fly-cart/view.php:3

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 Passed 29 tests

readme.txt Passed 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
4 plugin tags: widgets, wphoot, demo content, slider

hootkit/hootkit.php Passed 13 tests

The main PHP script in "HootKit" version 2.0.13 is automatically included on every request by WordPress
67 characters long description:
HootKit is a great companion plugin for WordPress themes by wpHoot.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin35,533 lines of code in 113 files:
LanguageFilesBlank linesComment linesLines of code
PHP821,4422,39313,325
SVG5009,556
JavaScript151,3414956,535
CSS111,6021466,117

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.62
Average class complexity15.11
▷ Minimum class complexity3.00
▷ Maximum class complexity182.00
Average method complexity5.34
▷ Minimum method complexity1.00
▷ Maximum method complexity76.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes44
▷ Abstract classes12.27%
▷ Concrete classes4397.73%
▷ Final classes00.00%
Methods143
▷ Static methods2618.18%
▷ Public methods13795.80%
▷ Protected methods00.00%
▷ Private methods64.20%
Functions82
▷ Named functions82100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
21 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/content-block-style-5.png1.66KB0.65KB▼ 60.81%
assets/images/posts-list-style-3.png1.06KB0.12KB▼ 88.32%
assets/images/content-block-style-4.png1.30KB0.34KB▼ 73.64%
assets/images/postlistcarousel-style-1.png1.07KB0.13KB▼ 88.30%
assets/images/slider-style-1.png1.85KB0.60KB▼ 67.56%