10% hooknotifier

Code Review | Hook.Notifier

WordPress plugin Hook.Notifier scored10%from 54 tests.

About plugin

  • Plugin page: hooknotifier
  • Plugin version: 2.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.5.1
  • WordPress version: 6.3.1
  • First release: Oct 3, 2020
  • Latest release: Jan 25, 2023
  • Number of updates: 6
  • Update frequency: every 141.0 days
  • Top authors: illuday (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /432 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Please fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/hooknotifier/admin/partials/hooknotifier-hooks.php+7
    Trying to access array offset on value of type bool

Server metrics [RAM: ▼1.80MB] [CPU: ▼51.71ms] Passed 4 tests

This is a short check of server-side resources used by Hook.Notifier
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.20 ▼1.275.75 ▼33.31
Dashboard /wp-admin2.22 ▼1.136.77 ▼49.29
Posts /wp-admin/edit.php2.22 ▼1.148.90 ▼38.84
Add New Post /wp-admin/post-new.php2.22 ▼3.677.69 ▼85.39
Media Library /wp-admin/upload.php2.22 ▼1.017.05 ▼26.38

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 31 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Hook.Notifier
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,928 ▲16713.88 ▼0.407.63 ▲5.7338.00 ▼1.31
Dashboard /wp-admin2,230 ▲565.63 ▲0.0283.48 ▼1.2538.63 ▼2.36
Posts /wp-admin/edit.php2,135 ▲351.99 ▲0.0342.45 ▲6.2137.47 ▲2.29
Add New Post /wp-admin/post-new.php1,540 ▲1423.55 ▼0.05658.21 ▼35.7452.85 ▼4.64
Media Library /wp-admin/upload.php1,432 ▲324.25 ▲0.08101.01 ▼4.6843.70 ▼3.22

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/hooknotifier/admin/partials/hooknotifier-hooks.php+7
    Trying to access array offset on value of type bool
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/hooknotifier/public/partials/hooknotifier-public-display.php
    • > /wp-content/plugins/hooknotifier/admin/partials/hooknotifier-admin-display.php
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hooknotifier/admin/partials/hooknotifier-functions.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/hooknotifier/admin/partials/hooknotifier-hooks.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (This screen shot description corresponds to screenshot-1.(png|jpg|jpeg|gif). Note that the screenshot is taken from), #2 (This is the second screen shot)
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === hooknotifier === )
Please take inspiration from this readme.txt

hooknotifier/hooknotifier.php 92% from 13 tests

"Hook.Notifier" version 2.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 142 characters long)

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
Success! There were no dangerous files found in this plugin1,030 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PHP14220562670
SVG501354
JavaScript24546
CSS2080

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity1.43
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.13
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods23
▷ Static methods28.70%
▷ Public methods1878.26%
▷ Protected methods00.00%
▷ Private methods521.74%
Functions33
▷ Named functions33100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/hooknotifier-icon.png2.02KB0.46KB▼ 77.42%
images/hooknotifier-icon@2x.png2.08KB0.66KB▼ 68.20%