78% hexyimagewidget

Code Review | Haxy Image Widget

WordPress plugin Haxy Image Widget scored78%from 54 tests.

About plugin

  • Plugin page: hexyimagewidget
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.2
  • WordPress version: 6.3.1
  • First release: Apr 9, 2015
  • Latest release: Apr 21, 2015
  • Number of updates: 18
  • Update frequency: every 0.7 days
  • Top authors: Rimaz (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,371 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼7.92ms] Passed 4 tests

This is a short check of server-side resources used by Haxy Image Widget
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0440.98 ▼15.59
Dashboard /wp-admin3.34 ▲0.0451.03 ▼2.86
Posts /wp-admin/edit.php3.45 ▲0.1053.32 ▼1.67
Add New Post /wp-admin/post-new.php5.92 ▲0.0395.56 ▼11.56
Media Library /wp-admin/upload.php3.26 ▲0.0339.74 ▼0.12

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 21 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
widget_hexyimage
can_compress_scripts
widget_recent-posts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

Haxy Image Widget: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,792 ▲3114.16 ▲0.011.76 ▲0.0344.33 ▼1.61
Dashboard /wp-admin2,201 ▲275.64 ▲0.0282.95 ▼7.6542.48 ▲0.48
Posts /wp-admin/edit.php2,106 ▲62.01 ▲0.0142.32 ▲4.4938.18 ▼0.70
Add New Post /wp-admin/post-new.php1,539 ▲1118.30 ▼4.81676.52 ▲30.0374.07 ▲13.00
Media Library /wp-admin/upload.php1,403 ▲34.27 ▲0.0497.43 ▼12.4840.50 ▼6.17

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 7 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_hexyimage
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
Please take a closer look at the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/hexyimagewidget/templates/widget.php
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/hexyimagewidget/hexy-image-widget.php:38
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/hexyimagewidget/includes/class-hexy-image-widget.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #2 (The widget after selecting an image.), #3 (Has Follow and No Follow)
You can take inspiration from this readme.txt

hexyimagewidget/hexy-image-widget.php 85% from 13 tests

The primary PHP file in "Haxy Image Widget" version 1.2 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("hexyimagewidget.php" instead of "hexy-image-widget.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin1,430 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP6162630702
PO File4122143340
JavaScript16038261
CSS1276127

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity21.20
▷ Minimum class complexity1.00
▷ Maximum class complexity50.00
Average method complexity3.73
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods37
▷ Static methods25.41%
▷ Public methods3081.08%
▷ Protected methods718.92%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
PNG images were not found in this plugin