84% huzhop

Code Review | Huzhop

WordPress plugin Huzhop scored84%from 54 tests.

About plugin

  • Plugin page: huzhop
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.2.2
  • WordPress version: 6.3.1
  • First release: Aug 30, 2019
  • Latest release: Aug 30, 2019
  • Number of updates: 6
  • Update frequency: every 0.2 days
  • Top authors: eosvn (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /579 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.19MB] [CPU: ▼24.57ms] Passed 4 tests

This is a short check of server-side resources used by Huzhop
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.43 ▼0.0425.71 ▼15.77
Dashboard /wp-admin3.11 ▼0.2330.08 ▼33.47
Posts /wp-admin/edit.php3.25 ▼0.1034.75 ▼21.88
Add New Post /wp-admin/post-new.php5.50 ▼0.3972.61 ▼27.15
Media Library /wp-admin/upload.php3.20 ▼0.0331.02 ▼8.74
Huzhop /wp-admin/options-general.php?page=huzhop-setting-admin3.1027.68

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Huzhop
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,826 ▲6514.35 ▲0.092.35 ▲0.5344.34 ▲0.07
Dashboard /wp-admin2,201 ▲215.52 ▼0.0892.65 ▲5.1640.40 ▼0.05
Posts /wp-admin/edit.php2,103 ▼02.00 ▲0.0034.88 ▼7.7132.35 ▼8.93
Add New Post /wp-admin/post-new.php1,531 ▼620.93 ▲2.75689.66 ▲77.5944.45 ▼22.43
Media Library /wp-admin/upload.php1,409 ▲64.12 ▼0.08111.11 ▲9.0047.56 ▲5.85
Huzhop /wp-admin/options-general.php?page=huzhop-setting-admin7942.0224.4930.22

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=huzhop-setting-admin
    • > Warning in wp-content/plugins/huzhop/admin/huzhop-admin-functions.php+15
    time() expects exactly 0 parameters, 1 given

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots need descriptions #1, #2, #3 in huzhop/assets to your readme.txt
The official readme.txt might help

huzhop/huzhop.php 92% from 13 tests

The principal PHP file in "Huzhop" v. 1.0.1 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Requires at least: Required version does not match the one declared in readme.txt ("4.8" instead of "5.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin671 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP963192288
JavaScript24510194
CSS2396181
SVG2008

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity6.50
▷ Minimum class complexity3.00
▷ Maximum class complexity10.00
Average method complexity1.92
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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
1 PNG file occupies 0.02MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/img/logo.png17.76KB2.17KB▼ 87.81%