84% hyakunin-isshu-admin-bar

Code Review | Hyakunin Isshu Admin Bar

WordPress plugin Hyakunin Isshu Admin Bar scored84%from 54 tests.

About plugin

  • Plugin page: hyakunin-isshu-ad...
  • Plugin version: 1.13
  • PHP compatiblity: 8.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4
  • WordPress version: 6.3.1
  • First release: Feb 27, 2023
  • Latest release: Oct 29, 2023
  • Number of updates: 21
  • Update frequency: every 11.6 days
  • Top authors: Katsushi Kawamori (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /504 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 successfully, without throwing any errors or notices

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

A check of server-side resources used by Hyakunin Isshu Admin Bar
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0039.49 ▼1.52
Dashboard /wp-admin3.31 ▼0.0342.56 ▼27.12
Posts /wp-admin/edit.php3.36 ▲0.0141.06 ▼3.74
Add New Post /wp-admin/post-new.php5.92 ▲0.0376.88 ▼14.24
Media Library /wp-admin/upload.php3.23 ▲0.0133.10 ▲0.81

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Hyakunin Isshu Admin Bar
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,844 ▲8313.51 ▼0.771.67 ▼0.0344.22 ▲1.80
Dashboard /wp-admin2,244 ▲675.17 ▼0.49103.45 ▲5.3958.94 ▲16.40
Posts /wp-admin/edit.php2,148 ▲482.60 ▲0.5942.97 ▲4.1859.69 ▲23.10
Add New Post /wp-admin/post-new.php1,560 ▲2318.15 ▼0.28641.85 ▲35.4190.32 ▲21.30
Media Library /wp-admin/upload.php1,518 ▲1184.86 ▲0.68104.12 ▼4.4850.93 ▲9.62

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% 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)
Good news, no errors were detected

SRP 50% 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
Please fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hyakunin-isshu-admin-bar/class-hyakuninisshu.php:46

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
3 plugin tags: poem, admin bar, notice

hyakunin-isshu-admin-bar/class-hyakuninisshu.php 92% from 13 tests

"Hyakunin Isshu Admin Bar" version 1.13's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("hyakunin-isshu-admin-bar.php" instead of "class-hyakuninisshu.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected779 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP23071680
JavaScript211148
Sass10030
JSON10020
CSS1001

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.05
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.12
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods675.00%
▷ Protected methods00.00%
▷ Private methods225.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin