84% hook-flowchart

Code Review | Hook Flowchart

WordPress plugin Hook Flowchart scored84%from 54 tests.

About plugin

  • Plugin page: hook-flowchart
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.2
  • WordPress version: 6.3.1
  • First release: Jan 19, 2016
  • Latest release: Jun 25, 2019
  • Number of updates: 8
  • Update frequency: every 156.6 days
  • Top authors: Mte90 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,232 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.19MB] [CPU: ▲6.09ms] Passed 4 tests

A check of server-side resources used by Hook Flowchart
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1353.67 ▲10.50
Dashboard /wp-admin3.50 ▲0.2061.19 ▲7.42
Posts /wp-admin/edit.php3.61 ▲0.2664.02 ▲10.76
Add New Post /wp-admin/post-new.php6.15 ▲0.26109.40 ▼4.33
Media Library /wp-admin/upload.php3.42 ▲0.1949.01 ▲12.94

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 329 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Hook Flowchart
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,063 ▲30219.64 ▲5.3016.71 ▲15.0339.73 ▼3.75
Dashboard /wp-admin2,264 ▲907.38 ▲1.79107.07 ▲15.4239.34 ▼1.84
Posts /wp-admin/edit.php2,175 ▲754.63 ▲2.6855.37 ▲17.7736.70 ▲4.43
Add New Post /wp-admin/post-new.php1,455 ▼7117.92 ▼5.79589.67 ▼99.3229.88 ▼24.87
Media Library /wp-admin/upload.php1,467 ▲676.65 ▲2.44111.41 ▲10.3940.19 ▼7.91

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • hook-flowchart
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/hook-flowchart/admin/includes/CMB2/bootstrap.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function new_cmb2_box() in wp-content/plugins/hook-flowchart/admin/views/admin.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hook-flowchart/admin/includes/CMB2/init.php:119
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hook-flowchart/includes/load_textdomain.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention: You can take inspiration from this readme.txt

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

The main PHP file in "Hook Flowchart" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
95 characters long description:
In every WordPress page there are in action many hooks but what are the relations between them?

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected37,780 lines of code in 164 files:
LanguageFilesBlank linesComment linesLines of code
PO File12012,62016,21728,955
CSS61,0181,0374,184
PHP219132,2422,837
Sass11168231,116
JavaScript6165121688

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity38.33
▷ Minimum class complexity3.00
▷ Maximum class complexity113.00
Average method complexity3.65
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes15
▷ Abstract classes00.00%
▷ Concrete classes15100.00%
▷ Final classes00.00%
Methods211
▷ Static methods2411.37%
▷ Public methods19893.84%
▷ Protected methods83.79%
▷ Private methods52.37%
Functions17
▷ Named functions17100.00%
▷ Anonymous functions00.00%
Constants11
▷ Global constants872.73%
▷ Class constants327.27%
▷ Public constants3100.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
19 PNG files occupy 0.22MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/banner-772x250.png69.28KB28.92KB▼ 58.26%
admin/includes/CMB2/images/ui-bg_glass_65_ffffff_1x400.png0.10KB0.10KB▼ 5.71%
admin/includes/CMB2/images/ui-icons_2e83ff_256x240.png4.27KB4.11KB▼ 3.78%
admin/includes/CMB2/images/ui-icons_454545_256x240.png4.27KB4.11KB▼ 3.78%
admin/includes/CMB2/images/ui-icons_cd0a0a_256x240.png4.27KB4.11KB▼ 3.78%