94% prioritize-hooks

Code Review | Prioritize Hooks

WordPress plugin Prioritize Hooks scored 94% from 54 tests.

About plugin

  • Plugin page: prioritize-hooks
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-3.8
  • WordPress version: 5.8.1
  • First release: Oct 25, 2012
  • Latest release: Dec 30, 2013
  • Number of updates: 17
  • Update frequency: every 25.4 days
  • Top authors: jweathe (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active / 1,587 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.15MB] [CPU: ▼138.58ms] Passed 4 tests

An overview of server-side resources used by Prioritize Hooks
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.87 ▲0.1545.66 ▲23.31
Dashboard /wp-admin3.25 ▲0.2062.18 ▲3.45
Posts /wp-admin/edit.php3.30 ▲0.1957.19 ▲3.56
Add New Post /wp-admin/post-new.php5.55 ▲0.12110.65 ▼566.72
Media Library /wp-admin/upload.php3.13 ▲0.1345.67 ▲5.41
Prioritize Hooks /wp-admin/tools.php?page=prioritize-hooks3.1039.10

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Prioritize Hooks
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,689 ▲11716.36 ▲0.8812.65 ▼2.8650.48 ▼4.82
Dashboard /wp-admin2,977 ▲406.01 ▼0.15168.01 ▼2.01127.24 ▲4.95
Posts /wp-admin/edit.php2,749 ▲102.73 ▲0.0273.17 ▼1.8897.98 ▼2.81
Add New Post /wp-admin/post-new.php1,624 ▲4321.38 ▲3.60337.30 ▼116.89122.54 ▼1.07
Media Library /wp-admin/upload.php1,817 ▲105.10 ▲0.08183.45 ▲3.88128.40 ▲4.61
Prioritize Hooks /wp-admin/tools.php?page=prioritize-hooks1,8322.5379.10111.91

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The plugin uninstalled completely, with no zombie files or tables

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)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/prioritize-hooks/prioritizehooks.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/prioritize-hooks/prioritizehooks-admin.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found


Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
4 plugin tags: override, hooks, filters, actions

prioritize-hooks/prioritizehooks.php 92% from 13 tests

This is the main PHP file of "Prioritize Hooks" version 1.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("prioritize-hooks.php" instead of "prioritizehooks.php")

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
No dangerous file extensions were detected247 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity12.00
▷ Minimum class complexity6.00
▷ Maximum class complexity20.00
Average method complexity2.38
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
▷ Static methods2395.83%
▷ Public methods1875.00%
▷ Protected methods00.00%
▷ Private methods625.00%
▷ Named functions00.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants5100.00%
▷ Public constants5100.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