84% cookbook-hook-guide

Code Review | Cookbook Hook Guide

WordPress plugin Cookbook Hook Guide scored84%from 54 tests.

About plugin

  • Plugin page: cookbook-hook-guide
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.7.2
  • WordPress version: 6.3.1
  • First release: Feb 18, 2017
  • Latest release: Feb 18, 2017
  • Number of updates: 4
  • Update frequency: every 0.8 days
  • Top authors: fatmedia (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,241 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼5.98ms] Passed 4 tests

This is a short check of server-side resources used by Cookbook Hook Guide
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0349.62 ▲3.15
Dashboard /wp-admin3.32 ▲0.0250.57 ▼2.80
Posts /wp-admin/edit.php3.37 ▲0.0248.29 ▼2.91
Add New Post /wp-admin/post-new.php5.90 ▲0.0289.78 ▼15.56
Media Library /wp-admin/upload.php3.24 ▲0.0233.96 ▼2.64

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Cookbook Hook Guide
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲3014.25 ▲0.031.63 ▼0.1543.58 ▲0.24
Dashboard /wp-admin2,192 ▲125.55 ▼0.0885.43 ▼4.4941.08 ▼3.56
Posts /wp-admin/edit.php2,097 ▼62.02 ▼0.0235.66 ▲0.0235.73 ▼1.11
Add New Post /wp-admin/post-new.php1,540 ▼1018.58 ▼4.55617.34 ▼2.8767.29 ▲14.85
Media Library /wp-admin/upload.php1,400 ▼04.24 ▲0.0195.20 ▲0.2743.13 ▲0.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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/cookbook-hook-guide/templates/hook-info-nested.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/cookbook-hook-guide/templates/hook-info.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
  • Screenshots: Add an image for screenshot #2 (Cookbook Print Preview with Hook Guide Enabled.)
You can look at the official readme.txt

cookbook-hook-guide/cookbook-hook-guide.php Passed 13 tests

"Cookbook Hook Guide" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
72 characters long description:
The simplest visual hook guide for the simplest WordPress recipe plugin.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected276 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP658222155
CSS2197106
Markdown210015

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.26
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%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
No PNG files were detected