84% hook-timer

Code Review | Hook Timer

WordPress plugin Hook Timer scored84%from 54 tests.

About plugin

  • Plugin page: hook-timer
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.1
  • WordPress version: 6.3.1
  • First release: Feb 11, 2015
  • Latest release: Feb 11, 2015
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: sgrant (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /855 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲3.88MB] [CPU: ▲49.57ms] Passed 4 tests

An overview of server-side resources used by Hook Timer
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /7.01 ▲3.5489.73 ▲43.49
Dashboard /wp-admin7.05 ▲3.74101.17 ▲46.23
Posts /wp-admin/edit.php7.20 ▲3.8592.46 ▲40.88
Add New Post /wp-admin/post-new.php12.02 ▲6.14165.38 ▲67.67
Media Library /wp-admin/upload.php7.63 ▲4.40103.63 ▲68.95
Hook Timer /wp-admin/options-general.php?page=hooktimer8.2480.49

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
hooktimer_times
db_upgraded
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

Hook Timer: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,794 ▲4814.48 ▲0.182.24 ▲0.0742.99 ▼3.24
Dashboard /wp-admin2,213 ▲284.88 ▼1.03103.15 ▼1.5341.56 ▼4.58
Posts /wp-admin/edit.php2,093 ▲42.04 ▲0.0837.47 ▼4.5734.68 ▼3.35
Add New Post /wp-admin/post-new.php1,544 ▲19223.52 ▲6.35725.05 ▲175.4357.76 ▲10.59
Media Library /wp-admin/upload.php1,395 ▲44.12 ▼0.05110.36 ▲1.4948.02 ▲3.19
Hook Timer /wp-admin/options-general.php?page=hooktimer9,0761.2026.69106.51

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • hooktimer_times
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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 fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hook-timer/hook-timer.php:42

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 Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
8 plugin tags: hooks, time, filters, action, hook...

hook-timer/hook-timer.php Passed 13 tests

The primary PHP file in "Hook Timer" version 1.0 is used by WordPress to initiate all plugin functionality
46 characters long description:
Track the time elapsed for each WordPress hook

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected81 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1292081

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity1.60
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods110.00%
▷ Public methods990.00%
▷ Protected methods110.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.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
There are no PNG files in this plugin