94% hooks-view

Code Review | Hooks View

WordPress plugin Hooks View scored 94% from 54 tests.

About plugin

  • Plugin page: hooks-view
  • Plugin version: 1.02
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.7
  • WordPress version: 5.9.2
  • First release: Dec 23, 2019
  • Latest release: Mar 5, 2021
  • Number of updates: 10
  • Update frequency: every 43.8 days
  • Top authors: Katsushi Kawamori (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 648 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼294.63ms] Passed 4 tests

Analyzing server-side resources used by Hooks View
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.01113.07 ▲61.34
Dashboard /wp-admin3.42 ▲0.0134.41 ▼0.89
Posts /wp-admin/edit.php3.65 ▲0.0137.41 ▼4.16
Add New Post /wp-admin/post-new.php6.89 ▼0.0891.93 ▼1,176.65
Media Library /wp-admin/upload.php3.30 ▲0.0127.77 ▲3.18
Hooks View /wp-admin/tools.php?page=hooksview3.2524.29

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Hooks View
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,800 ▲4615.14 ▼0.457.07 ▲0.682.96 ▲0.12
Dashboard /wp-admin2,897 ▲466.11 ▼0.05116.41 ▼23.51224.29 ▲56.30
Posts /wp-admin/edit.php2,696 ▲53.24 ▲0.0062.75 ▼2.81146.53 ▼5.33
Add New Post /wp-admin/post-new.php1,714 ▲5420.74 ▲4.84452.35 ▲6.61189.78 ▼12.44
Media Library /wp-admin/upload.php1,700 ▲25.53 ▲0.06151.10 ▲4.89187.11 ▲1.96
Hooks View /wp-admin/tools.php?page=hooksview1,1922.4160.86190.50

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hooks-view/lib/class-hooksview.php:36
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hooks-view/lib/class-hooksview.php:36

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
1 plugin tags: hook

hooks-view/hooksview.php 92% from 13 tests

"Hooks View" version 1.02's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("hooks-view.php" instead of "hooksview.php")

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
There were no executable files found in this plugin221 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP23786198
CSS10023

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity28.00
▷ Minimum class complexity28.00
▷ Maximum class complexity28.00
Average method complexity4.86
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods571.43%
▷ Protected methods00.00%
▷ Private methods228.57%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
PNG images were not found in this plugin