84% hagakure

Code Review | Hagakure - Yet Another Error Reporter

WordPress plugin Hagakure - Yet Another Error Reporter scored 84% from 54 tests.

About plugin

  • Plugin page: hagakure
  • Plugin version: 1.2.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.1
  • WordPress version: 6.3.1
  • First release: May 10, 2019
  • Latest release: Nov 29, 2022
  • Number of updates: 9
  • Update frequency: every 144.5 days
  • Top authors: Takahashi_Fumiki (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active / 759 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼1.06ms] Passed 4 tests

This is a short check of server-side resources used by Hagakure - Yet Another Error Reporter
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1034.95 ▼7.60
Dashboard /wp-admin3.40 ▲0.0946.28 ▼4.47
Posts /wp-admin/edit.php3.51 ▲0.1550.07 ▲6.50
Add New Post /wp-admin/post-new.php5.98 ▲0.0995.22 ▲2.12
Media Library /wp-admin/upload.php3.32 ▲0.0936.71 ▲5.71

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 21 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Hagakure - Yet Another Error Reporter
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.27 ▼1.424.22 ▲2.1341.07 ▼4.38
Dashboard /wp-admin2,209 ▲214.81 ▼0.08110.17 ▼4.1039.10 ▼2.10
Posts /wp-admin/edit.php2,089 ▼02.02 ▼0.0141.39 ▲6.9034.67 ▲2.73
Add New Post /wp-admin/post-new.php1,533 ▲1123.37 ▼0.08683.50 ▲25.7658.87 ▲3.75
Media Library /wp-admin/upload.php1,385 ▼04.19 ▲0.0794.74 ▼18.6642.77 ▼6.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
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • 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
Even though everything seems fine, this is not an exhaustive test

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
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'Kunoichi\\Hagakure\\Pattern\\Singleton' not found in wp-content/plugins/hagakure/src/Kunoichi/Hagakure/DbLogger.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'WP_CLI_Command' not found in wp-content/plugins/hagakure/src/Kunoichi/Hagakure/Command.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Kunoichi\\Hagakure\\Pattern\\Singleton' not found in wp-content/plugins/hagakure/src/Kunoichi/Hagakure/ErrorHandler.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Kunoichi\\Hagakure\\Pattern\\Singleton' not found in wp-content/plugins/hagakure/src/Kunoichi/Hagakure/SlowQuery.php:11

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 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
3 plugin tags: error, php, recovery

hagakure/hagakure.php 92% from 13 tests

Analyzing the main PHP file in "Hagakure - Yet Another Error Reporter" version 1.2.0
The following require your attention:
  • Domain Path: The domain path is invalid: folder "/languages" does not exist

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
Good job! No executable or dangerous file extensions detected808 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP16181544803
JSON1005

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity14.56
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity3.09
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes9
▷ Abstract classes111.11%
▷ Concrete classes888.89%
▷ Final classes00.00%
Methods58
▷ Static methods1932.76%
▷ Public methods4882.76%
▷ Protected methods712.07%
▷ Private methods35.17%
Functions3
▷ Named functions133.33%
▷ Anonymous functions266.67%
Constants0
▷ Global constants00.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
No PNG files were detected