10% genesis-hooks

Code Review | Genesis Hooks

WordPress plugin Genesis Hooks scored 10% from 54 tests.

About plugin

  • Plugin page: genesis-hooks
  • Plugin version: 0.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.3
  • WordPress version: 6.3.1
  • First release: Sep 29, 2011
  • Latest release: Apr 22, 2012
  • Number of updates: 24
  • Update frequency: every 8.6 days
  • Top authors: wpsmith (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 12,674 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
These installer errors require your attention
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/genesis-hooks/genesis-hooks.php+265
    Trying to access array offset on value of type bool

Server metrics [RAM: ▼0.12MB] [CPU: ▼4.85ms] Passed 4 tests

An overview of server-side resources used by Genesis Hooks
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.96 ▼0.4921.00 ▼23.31
Dashboard /wp-admin3.31 ▲0.0047.20 ▼5.21
Posts /wp-admin/edit.php3.36 ▲0.0048.50 ▲3.72
Add New Post /wp-admin/post-new.php5.89 ▲0.0094.99 ▲9.77
Media Library /wp-admin/upload.php3.23 ▲0.0038.69 ▲5.42

Server storage [IO: ▲0.43MB] [DB: ▲0.55MB] Passed 3 tests

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Genesis Hooks
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲7213.37 ▼0.995.82 ▲3.7843.93 ▼0.44
Dashboard /wp-admin2,206 ▲144.83 ▼0.08111.37 ▼6.4744.92 ▼1.59
Posts /wp-admin/edit.php2,089 ▼32.01 ▼0.0138.74 ▲4.5035.21 ▼0.22
Add New Post /wp-admin/post-new.php1,537 ▲423.34 ▲0.21646.68 ▲49.5851.60 ▼0.89
Media Library /wp-admin/upload.php1,391 ▲64.18 ▲0.0095.83 ▼4.1644.95 ▲0.83

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin cannot be uninstalled
    • > Warning in wp-content/plugins/genesis-hooks/uninstall.php+8
    Invalid argument supplied for foreach()
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts

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
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/genesis-hooks/genesis-hooks.php:41

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (Screenshot before activating the plugin.), #2 (Screenshot after activating the plugin.), #3 (The code when you use Developer tool in Google Chrome.)
You can take inspiration from this readme.txt

genesis-hooks/genesis-hooks.php 92% from 13 tests

"Genesis Hooks" version 0.7's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Domain Path: The domain path is invalid: folder "/languages/" does not exist

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
There were no executable files found in this plugin184 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP25059184

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.26
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%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
There were not PNG files found in your plugin