84% wp-hooks-browser

Code Review | WP Hooks Browser

WordPress plugin WP Hooks Browser scored84%from 54 tests.

About plugin

  • Plugin page: wp-hooks-browser
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.4
  • WordPress version: 6.3.1
  • First release: Oct 14, 2015
  • Latest release: Mar 3, 2016
  • Number of updates: 12
  • Update frequency: every 11.8 days
  • Top authors: curi0us_s0ul (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,241 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

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

Server-side resources used by WP Hooks Browser
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0143.55 ▲5.78
Dashboard /wp-admin3.31 ▲0.0143.47 ▼5.70
Posts /wp-admin/edit.php3.43 ▲0.0746.36 ▼5.42
Add New Post /wp-admin/post-new.php5.91 ▲0.0381.36 ▼20.84
Media Library /wp-admin/upload.php3.24 ▲0.0135.99 ▲3.36

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

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

Browser metrics Passed 4 tests

WP Hooks Browser: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,820 ▲8514.48 ▼0.301.57 ▼0.0242.75 ▲4.07
Dashboard /wp-admin2,229 ▲404.89 ▼0.07102.40 ▼23.0338.88 ▼4.58
Posts /wp-admin/edit.php2,109 ▲172.04 ▼0.0039.50 ▼4.7435.04 ▼1.62
Add New Post /wp-admin/post-new.php1,531 ▼1323.35 ▲5.12657.92 ▲32.5053.80 ▲4.02
Media Library /wp-admin/upload.php1,411 ▲264.24 ▼0.0196.48 ▼3.0741.94 ▼3.69

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% 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)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wp-hooks-browser/lib/admin-page.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wp-hooks-browser/trunk/lib/admin-page.php:2

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 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Screenshots: Screenshot #4 (String search support) image not found
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
You can look at the official readme.txt

wp-hooks-browser/wp-hooks-browser.php Passed 13 tests

This is the main PHP file of "WP Hooks Browser" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
115 characters long description:
A very simple plugin to document all the used and or defined hooks inside any of the installed theme and or plugins

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
Good job! No executable or dangerous file extensions detected650 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP4117313548
CSS113078
JavaScript13024

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity53.00
▷ Minimum class complexity53.00
▷ Maximum class complexity53.00
Average method complexity3.89
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes2100.00%
Methods36
▷ Static methods25.56%
▷ Public methods2672.22%
▷ Protected methods00.00%
▷ Private methods1027.78%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.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 images were found in this plugin