84% visual-action-hooks

Code Review | Visual Action Hooks

WordPress plugin Visual Action Hooks scored84%from 54 tests.

About plugin

  • Plugin page: visual-action-hooks
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.9
  • WordPress version: 6.3.1
  • First release: Mar 1, 2022
  • Latest release: Mar 1, 2022
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: elpap (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,587 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▲0.32ms] Passed 4 tests

This is a short check of server-side resources used by Visual Action Hooks
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0751.38 ▲9.40
Dashboard /wp-admin3.33 ▲0.0351.85 ▲5.71
Posts /wp-admin/edit.php3.38 ▲0.0346.00 ▼2.58
Add New Post /wp-admin/post-new.php5.91 ▲0.0393.60 ▼7.74
Media Library /wp-admin/upload.php3.25 ▲0.0237.15 ▲5.89

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_recent-posts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Visual Action Hooks
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,912 ▲17713.62 ▼1.039.54 ▲7.3136.90 ▼8.73
Dashboard /wp-admin2,220 ▲324.87 ▼1.03107.84 ▼5.0741.02 ▼1.48
Posts /wp-admin/edit.php2,103 ▲142.05 ▼0.0139.47 ▼1.1734.53 ▲0.13
Add New Post /wp-admin/post-new.php1,542 ▼023.29 ▲4.80639.31 ▲28.8952.57 ▼2.37
Media Library /wp-admin/upload.php1,399 ▲144.20 ▲0.0395.23 ▼3.4843.64 ▼1.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
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/visual-action-hooks/visual-action-hooks.admin.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
7 plugin tags: visual, wordpress, hooks, action, guide...

visual-action-hooks/visual-action-hooks.php 85% from 13 tests

The entry point to "Visual Action Hooks" version 1.0.0 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Requires at least: Required version must match the one declared in readme.txt ("4.7" instead of "5.0")
  • Domain Path: The domain path points to a folder that does not exist ("/languages/")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin166 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP33449132
CSS10024
JavaScript10010

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity12.00
▷ Minimum class complexity12.00
▷ Maximum class complexity12.00
Average method complexity1.86
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods112.50%
▷ Public methods787.50%
▷ Protected methods00.00%
▷ Private methods112.50%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin