84% hana-widgets

Code Review | Hana Widgets

WordPress plugin Hana Widgets scored84%from 54 tests.

About plugin

  • Plugin page: hana-widgets
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-4.5.3
  • WordPress version: 6.3.1
  • First release: Aug 8, 2016
  • Latest release: Sep 12, 2016
  • Number of updates: 8
  • Update frequency: every 4.8 days
  • Top authors: scui2 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /790 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.28MB] [CPU: ▲1.16ms] Passed 4 tests

This is a short check of server-side resources used by Hana Widgets
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.75 ▲0.2941.35 ▲2.12
Dashboard /wp-admin3.58 ▲0.2748.72 ▲1.30
Posts /wp-admin/edit.php3.69 ▲0.3348.30 ▲0.09
Add New Post /wp-admin/post-new.php6.16 ▲0.2794.43 ▲1.12
Media Library /wp-admin/upload.php3.50 ▲0.2737.41 ▲3.20

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 27 new files
Database: no new tables, 9 new options
New WordPress options
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_widget_hana_marketing
widget_theysaidso_widget
widget_hana_navigation
widget_hana_recent_post
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Hana Widgets
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,974 ▲23913.88 ▼0.5016.48 ▲14.7956.98 ▲13.48
Dashboard /wp-admin2,209 ▲185.85 ▼0.0599.30 ▼11.3440.32 ▼5.72
Posts /wp-admin/edit.php2,089 ▼02.17 ▲0.0136.57 ▼6.3233.25 ▼3.22
Add New Post /wp-admin/post-new.php1,533 ▼023.23 ▲0.04655.10 ▼73.2161.82 ▼11.09
Media Library /wp-admin/upload.php1,388 ▼04.19 ▼0.0497.64 ▼15.9244.33 ▼2.98

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 9 options in the database
    • widget_hana_recent_post
    • widget_recent-posts
    • widget_hana_navigation
    • widget_recent-comments
    • widget_widget_hana_marketing
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/hana-widgets/inc/widget-navigation.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/hana-widgets/inc/widget-recentpost.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/hana-widgets/inc/widget-marketing.php:13

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

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
1 plugin tags: widget

hana-widgets/hana-widgets.php 92% from 13 tests

The principal PHP file in "Hana Widgets" v. 1.0.3 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Domain Path: The domain path folder does not exist ("/languages/")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin12,909 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
CSS64212175,678
JavaScript41,2512,7655,151
PHP91501321,395
SVG100685

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity24.75
▷ Minimum class complexity5.00
▷ Maximum class complexity45.00
Average method complexity4.22
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods59
▷ Static methods58.47%
▷ Public methods5389.83%
▷ Protected methods00.00%
▷ Private methods610.17%
Functions16
▷ Named functions16100.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
There were not PNG files found in your plugin