84% image-widget

Code Review | Image Widget

WordPress plugin Image Widget scored 84% from 54 tests.

About plugin

  • Plugin page: image-widget
  • Plugin version: 4.4.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.6
  • WordPress version: 5.9.2
  • First release: Jul 26, 2008
  • Latest release: Mar 9, 2021
  • Number of updates: 229
  • Update frequency: every 20.1 days
  • Top authors: peterchester (70.74%)zbtirrell (9.17%)mattwiebe (7.42%)borkweb (6.11%)barry.hughes (3.49%)

Code review

54 tests

User reviews

287 reviews

Install metrics

200,000+ active / 4,108,128 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.07MB] [CPU: ▼295.05ms] Passed 4 tests

An overview of server-side resources used by Image Widget
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1256.07 ▼1.10
Dashboard /wp-admin3.50 ▲0.1034.79 ▼2.99
Posts /wp-admin/edit.php3.73 ▲0.0942.96 ▲3.44
Add New Post /wp-admin/post-new.php6.96 ▼0.0193.75 ▼1,163.59
Media Library /wp-admin/upload.php3.38 ▲0.0825.88 ▼12.53

Server storage [IO: ▲0.07MB] [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, 1 new option
New WordPress options

Browser metrics Passed 4 tests

A check of browser resources used by Image Widget
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,795 ▲4115.07 ▼0.586.40 ▼0.732.89 ▲0.20
Dashboard /wp-admin2,895 ▲376.13 ▲0.03120.33 ▼18.81159.41 ▼2.07
Posts /wp-admin/edit.php2,691 ▼03.23 ▲0.0164.94 ▼1.87145.50 ▼70.38
Add New Post /wp-admin/post-new.php1,661 ▼015.87 ▼0.59452.51 ▲4.93161.18 ▼16.79
Media Library /wp-admin/upload.php1,695 ▼35.51 ▼0.02149.30 ▲1.10242.85 ▲45.09

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
  • Zombie WordPress options detected upon uninstall: 1 option
    • widget_widget_sp_image

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

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
Please fix the following items
  • 4× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/image-widget/views/widget-admin.php
    • > /wp-content/plugins/image-widget/image-widget.php
    • > /wp-content/plugins/image-widget/views/widget.php
    • > /wp-content/plugins/image-widget/views/widget-admin.deprecated.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test


Plugin configuration 93% from 29 tests

readme.txt 94% from 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
Please fix the following attributes:
  • Screenshots: No descriptions were found for these screenshots #2, #3 in image-widget/assets to your readme.txt
You can take inspiration from this readme.txt

image-widget/image-widget.php 92% from 13 tests

The main file in "Image Widget" v. 4.4.7 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Description: The description should be shorter than 140 characters (currently 207 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin848 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity48.00
▷ Minimum class complexity30.00
▷ Maximum class complexity66.00
Average method complexity4.24
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
▷ Static methods310.34%
▷ Public methods2068.97%
▷ Protected methods00.00%
▷ Private methods931.03%
▷ Named functions1100.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin