84% hoko

Code Review | Hoko

WordPress plugin Hoko scored84%from 54 tests.

About plugin

  • Plugin page: hoko
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: May 1, 2016
  • Latest release: May 1, 2016
  • Number of updates: 5
  • Update frequency: every 44.8 days
  • Top authors: pazis (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /603 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼5.62ms] Passed 4 tests

Server-side resources used by Hoko
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0143.18 ▲0.41
Dashboard /wp-admin3.32 ▲0.0250.88 ▼0.91
Posts /wp-admin/edit.php3.37 ▲0.0154.71 ▼0.94
Add New Post /wp-admin/post-new.php5.90 ▲0.0191.01 ▼21.05
Media Library /wp-admin/upload.php3.24 ▲0.0138.65 ▲3.72

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 9 new options
New WordPress options
hokoir_plugin_widget_drop
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-posts
widget_theysaidso_widget
widget_hoko_widget
widget_recent-comments
hokoir_plugin_widget_new

Browser metrics Passed 4 tests

Hoko: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,801 ▲4014.20 ▼0.351.59 ▲0.0141.74 ▼1.59
Dashboard /wp-admin2,204 ▲245.62 ▼0.0282.07 ▼10.6443.24 ▼0.61
Posts /wp-admin/edit.php2,112 ▲122.02 ▲0.0334.64 ▼7.1642.50 ▲6.29
Add New Post /wp-admin/post-new.php1,536 ▲122.92 ▲4.63710.01 ▲45.8263.18 ▲3.08
Media Library /wp-admin/upload.php1,412 ▲154.20 ▲0.0198.85 ▼1.6048.12 ▲4.14

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 9 options
    • theysaidso_admin_options
    • hokoir_plugin_widget_drop
    • db_upgraded
    • widget_recent-comments
    • hokoir_plugin_widget_new
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_hoko_widget
    • can_compress_scripts

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)
Everything seems fine, however this is by no means 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
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/hoko/hokoir.php

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% 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
2 plugin tags: shortcode, widget

hoko/hokoir.php 85% from 13 tests

Analyzing the main PHP file in "Hoko" version 1.0
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("hoko.php" instead of "hokoir.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 219 characters long)

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
Everything looks great! No dangerous files found in this plugin480 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP15424296
CSS1100119
JavaScript20965

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin