89% beans-visual-hook-guide

Code Review | Beans Visual Hook Guide

WordPress plugin Beans Visual Hook Guide scored 89% from 54 tests.

About plugin

  • Plugin page: beans-visual-hook...
  • Plugin version: 1.1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.9.4
  • WordPress version: 5.8.1
  • First release: Mar 15, 2018
  • Latest release: Jul 20, 2018
  • Number of updates: 11
  • Update frequency: every 12.1 days
  • Top authors: Deftly (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 909 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼0.00MB] [CPU: ▼138.06ms] Passed 4 tests

Analyzing server-side resources used by Beans Visual Hook Guide
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.83 ▲0.1242.97 ▲19.30
Dashboard /wp-admin3.06 ▲0.0057.88 ▲7.35
Posts /wp-admin/edit.php3.11 ▲0.0061.41 ▲7.64
Add New Post /wp-admin/post-new.php5.42 ▼0.02105.84 ▼567.04
Media Library /wp-admin/upload.php3.00 ▲0.0037.33 ▼0.19

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 26 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Beans Visual Hook Guide
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲13115.92 ▲0.338.87 ▼0.7054.23 ▼4.67
Dashboard /wp-admin2,964 ▲305.86 ▼0.12165.52 ▼16.24122.98 ▼11.94
Posts /wp-admin/edit.php2,739 ▼02.72 ▲0.0174.01 ▲0.03110.03 ▲11.72
Add New Post /wp-admin/post-new.php1,683 ▼018.77 ▲0.05425.28 ▲15.17123.68 ▼2.34
Media Library /wp-admin/upload.php1,807 ▼05.02 ▼0.01172.50 ▼2.74132.03 ▲3.31

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/beans-visual-hook-guide/beans-visual-hook-guide.php
    • > /wp-content/plugins/beans-visual-hook-guide/src/markup/views/markup.php
  • 13× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function LearningCurve\\BeansVisualHookGuide\\Asset\\add_action() in wp-content/plugins/beans-visual-hook-guide/src/asset/ajax.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function LearningCurve\\BeansVisualHookGuide\\Admin\\__() in wp-content/plugins/beans-visual-hook-guide/config/admin-bar.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/beans-visual-hook-guide/src/admin/views/notice-error.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function LearningCurve\\BeansVisualHookGuide\\Admin\\add_action() in wp-content/plugins/beans-visual-hook-guide/src/admin/admin-bar.php:16
    • > PHP Notice
      Undefined variable: type in wp-content/plugins/beans-visual-hook-guide/src/markup/views/markup.php on line 13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function LearningCurve\\BeansVisualHookGuide\\add_action() in wp-content/plugins/beans-visual-hook-guide/src/plugin.php:14
    • > PHP Notice
      Undefined variable: type in wp-content/plugins/beans-visual-hook-guide/src/markup/views/markup.php on line 13
    • > PHP Notice
      Undefined variable: markup_id in wp-content/plugins/beans-visual-hook-guide/src/markup/views/markup.php on line 14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function LearningCurve\\BeansVisualHookGuide\\Admin\\add_action() in wp-content/plugins/beans-visual-hook-guide/src/admin/notices.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/beans-visual-hook-guide/src/admin/views/notice-warning.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration Passed 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
5 plugin tags: beans framework, beans, beans html api, development tool, hooks

beans-visual-hook-guide/beans-visual-hook-guide.php Passed 13 tests

"Beans Visual Hook Guide" version 1.1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
96 characters long description:
Find Beans Hooks (HTML API created action hooks only at the moment) quickly and easily by seeing

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
There were no executable files found in this plugin765 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP14138578428
JavaScript464119159
CSS214266
XML111747
JSON10039
Markdown218026

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity3.33
▷ Minimum class complexity3.00
▷ Maximum class complexity4.00
Average method complexity1.33
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods21
▷ Static methods14.76%
▷ Public methods1047.62%
▷ Protected methods00.00%
▷ Private methods1152.38%
Functions29
▷ Named functions2586.21%
▷ Anonymous functions413.79%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin