84% awesome-hooks

Code Review | Awesome Hooks

WordPress plugin Awesome Hooks scored84%from 54 tests.

About plugin

  • Plugin page: awesome-hooks
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.2.2
  • WordPress version: 6.3.1
  • First release: May 7, 2019
  • Latest release: Aug 8, 2023
  • Number of updates: 5
  • Update frequency: every 366.8 days
  • Top authors: surror (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /625 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.20MB] [CPU: ▼2.27ms] Passed 4 tests

Server-side resources used by Awesome Hooks
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.2038.46 ▼2.63
Dashboard /wp-admin3.50 ▲0.2046.80 ▲2.33
Posts /wp-admin/edit.php3.62 ▲0.2648.80 ▲1.02
Add New Post /wp-admin/post-new.php6.08 ▲0.2088.14 ▼9.79
Media Library /wp-admin/upload.php3.43 ▲0.2039.27 ▲5.48
All Hooks /wp-admin/edit.php?post_type=awesome-hook3.4736.43
License /wp-admin/edit.php?post_type=awesome-hook&page=license3.3933.64
Add New Hook /wp-admin/post-new.php?post_type=awesome-hook3.5552.58

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Awesome Hooks
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,851 ▲11613.19 ▼1.194.19 ▲2.6139.59 ▼5.67
Dashboard /wp-admin2,246 ▲585.89 ▼0.01109.67 ▲2.2243.14 ▲3.44
Posts /wp-admin/edit.php2,132 ▲432.02 ▲0.0238.93 ▼1.5938.37 ▲2.61
Add New Post /wp-admin/post-new.php1,543 ▲721.44 ▼1.90690.96 ▲65.8052.64 ▲5.20
Media Library /wp-admin/upload.php1,431 ▲464.19 ▲0.0396.18 ▼1.9639.99 ▼3.02
All Hooks /wp-admin/edit.php?post_type=awesome-hook1,1022.0237.1129.93
License /wp-admin/edit.php?post_type=awesome-hook&page=license8222.0624.6626.52
Add New Hook /wp-admin/post-new.php?post_type=awesome-hook2,4439.05221.0769.88

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • 97df133005cfa8561c9840fedf85c7b9
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • 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
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
Almost there! Just fix the following items
  • 9× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      Use of undefined constant AWESOME_HOOKS_DIR - assumed 'AWESOME_HOOKS_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/awesome-hooks/classes/class-awesome-hooks.php on line 37
    • > PHP Fatal error
      require_once(): Failed opening required 'AWESOME_HOOKS_DIRclasses/class-awesome-hooks-admin.php' (include_path='.:/usr/share/php') in wp-content/plugins/awesome-hooks/classes/class-awesome-hooks.php on line 37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/awesome-hooks/awesome-hooks.php:16
    • > PHP Warning
      require_once(AWESOME_HOOKS_DIRclasses/class-awesome-hooks-admin.php): failed to open stream: No such file or directory in wp-content/plugins/awesome-hooks/classes/class-awesome-hooks.php on line 37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/awesome-hooks/classes/class-awesome-hooks-post.php:37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/awesome-hooks/classes/class-awesome-hooks-theme-supports.php:37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/awesome-hooks/classes/class-awesome-hooks-admin.php:37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/awesome-hooks/themes/class-awesome-hooks-theme-twentysixteen.php:37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/awesome-hooks/themes/class-awesome-hooks-theme-awesomepress.php:37

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

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
4 plugin tags: hooks, awesome hooks, show hooks, add content hooks

awesome-hooks/awesome-hooks.php 92% from 13 tests

This is the main PHP file of "Awesome Hooks" version 1.0.1, 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:
  • Description: Please keep the plugin description shorter than 140 characters (currently 162 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin968 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP9321427951
CSS20017

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity18.25
▷ Minimum class complexity2.00
▷ Maximum class complexity73.00
Average method complexity3.83
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods48
▷ Static methods816.67%
▷ Public methods4797.92%
▷ Protected methods00.00%
▷ Private methods12.08%
Functions3
▷ Named functions00.00%
▷ Anonymous functions3100.00%
Constants8
▷ Global constants8100.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
There were not PNG files found in your plugin