90% hana-block

Code Review | Hana Block

WordPress plugin Hana Block scored90%from 54 tests.

About plugin

  • Plugin page: hana-block
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-4.6.1
  • WordPress version: 6.3.1
  • First release: Aug 11, 2016
  • Latest release: Sep 12, 2016
  • Number of updates: 7
  • Update frequency: every 4.6 days
  • Top authors: scui2 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /999 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.14MB] [CPU: ▼1.48ms] Passed 4 tests

An overview of server-side resources used by Hana Block
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1249.18 ▲8.10
Dashboard /wp-admin3.46 ▲0.1648.90 ▼3.13
Posts /wp-admin/edit.php3.57 ▲0.2152.24 ▼0.26
Add New Post /wp-admin/post-new.php6.04 ▲0.1587.21 ▼8.14
Media Library /wp-admin/upload.php3.38 ▲0.1543.56 ▲5.62
Add Content Block /wp-admin/post-new.php?post_type=hana_block3.5052.70
Content Blocks /wp-admin/edit.php?post_type=hana_block3.4242.44

Server storage [IO: ▲0.05MB] [DB: ▲0.00MB] 67% from 3 tests

Filesystem and database footprint
It is recommended to fix the following issues
  • There were 1 file (4.00KB) illegally modified outside of "wp-content/plugins/hana-block/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Hana Block: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,874 ▲8813.23 ▼1.142.00 ▲0.2640.02 ▼0.77
Dashboard /wp-admin2,250 ▲494.85 ▼0.07112.41 ▼0.8543.39 ▼1.01
Posts /wp-admin/edit.php2,132 ▲322.00 ▼0.0340.96 ▲6.3536.03 ▼0.48
Add New Post /wp-admin/post-new.php1,570 ▲1622.93 ▲4.85642.62 ▼25.5149.29 ▼3.72
Media Library /wp-admin/upload.php1,423 ▲264.23 ▲0.05107.85 ▲4.6044.90 ▼1.42
Add Content Block /wp-admin/post-new.php?post_type=hana_block2,3217.73183.8368.14
Content Blocks /wp-admin/edit.php?post_type=hana_block1,1161.9531.9628.07

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
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
1 plugin tags: content block

hana-block/hana-block.php Passed 13 tests

The entry point to "Hana Block" version 1.0.2 is a PHP file that has certain tags in its header comment area
86 characters long description:
A simple and powerful plugin that allows to create content block and display anywhere.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin1,344 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP58571668
CSS1646663
JavaScript13013

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity27.50
▷ Minimum class complexity3.00
▷ Maximum class complexity42.00
Average method complexity4.42
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods31
▷ Static methods26.45%
▷ Public methods2890.32%
▷ Protected methods00.00%
▷ Private methods39.68%
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

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected