84% wp-hooks-finder

Code Review | WP Hooks Finder

WordPress plugin WP Hooks Finder scored84%from 54 tests.

About plugin

  • Plugin page: wp-hooks-finder
  • Plugin version: 1.2.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Sep 11, 2020
  • Latest release: Jan 9, 2023
  • Number of updates: 27
  • Update frequency: every 31.5 days
  • Top authors: Muhammad Rehman (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

500+ active /6,304 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▲1.56ms] Passed 4 tests

A check of server-side resources used by WP Hooks Finder
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0249.15 ▲9.72
Dashboard /wp-admin3.32 ▲0.0258.47 ▲11.89
Posts /wp-admin/edit.php3.37 ▲0.0152.23 ▼5.52
Add New Post /wp-admin/post-new.php5.90 ▲0.0193.74 ▼1.92
Media Library /wp-admin/upload.php3.24 ▲0.0140.20 ▲3.96

Server storage [IO: ▲0.04MB] [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: 5 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Hooks Finder
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,858 ▲9714.69 ▲0.331.97 ▲0.1544.54 ▲1.65
Dashboard /wp-admin2,220 ▲405.64 ▲0.0383.52 ▼3.2340.22 ▼5.44
Posts /wp-admin/edit.php2,122 ▲222.02 ▼0.0033.63 ▼8.8932.80 ▼7.23
Add New Post /wp-admin/post-new.php1,542 ▲1623.94 ▲0.92661.34 ▼59.8566.06 ▲0.83
Media Library /wp-admin/upload.php1,422 ▲254.18 ▼0.0594.94 ▼2.8240.08 ▼1.90

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

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
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/wp-hooks-finder/wp-hooks-finder.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
4 plugin tags: action, filter, wordpress hooks, wp hooks

wp-hooks-finder/wp-hooks-finder.php 85% from 13 tests

The main file in "WP Hooks Finder" v. 1.2.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Description: The description should be shorter than 140 characters (currently 190 characters long)
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase

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
Good job! No executable or dangerous file extensions detected129 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1253997
CSS15032

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.77
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.04MB with 0.03MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/action.png18.23KB0.64KB▼ 96.51%
assets/img/filter.png17.83KB0.53KB▼ 97.00%