84% easy-image-widget

Code Review | Easy Image Widget

WordPress plugin Easy Image Widget scored84%from 54 tests.

About plugin

  • Plugin page: easy-image-widget
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.3.1
  • WordPress version: 6.3.1
  • First release: Jul 1, 2014
  • Latest release: Nov 30, 2015
  • Number of updates: 33
  • Update frequency: every 15.7 days
  • Top authors: racase (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active /2,538 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: ▼2.66ms] Passed 4 tests

A check of server-side resources used by Easy Image Widget
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0437.75 ▲1.71
Dashboard /wp-admin3.35 ▲0.0446.19 ▼0.14
Posts /wp-admin/edit.php3.40 ▲0.0449.59 ▲1.06
Add New Post /wp-admin/post-new.php5.93 ▲0.0480.43 ▼13.27
Media Library /wp-admin/upload.php3.27 ▲0.0435.44 ▲1.91

Server storage [IO: ▲0.02MB] [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: 10 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
widget_siw_widget

Browser metrics Passed 4 tests

A check of browser resources used by Easy Image Widget
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9013.27 ▼1.334.63 ▲2.8841.41 ▼0.96
Dashboard /wp-admin2,203 ▲155.90 ▲0.01115.17 ▲5.4940.97 ▲2.10
Posts /wp-admin/edit.php2,092 ▲32.05 ▲0.0840.92 ▲0.2133.63 ▼0.13
Add New Post /wp-admin/post-new.php1,535 ▲223.17 ▼0.06656.19 ▼47.7259.25 ▲1.32
Media Library /wp-admin/upload.php1,382 ▼64.25 ▲0.0296.89 ▼15.7441.10 ▼8.38

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_siw_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/easy-image-widget/widget.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/easy-image-widget/widget.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration Passed 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
10 plugin tags: simple, upload, widget-only, widget, thickbox...

easy-image-widget/easy-image-widget.php Passed 13 tests

The principal PHP file in "Easy Image Widget" v. 1.1.1 is loaded by WordPress automatically on each request
51 characters long description:
A simple WordPress plugin to add image in sidebars.

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
Success! There were no dangerous files found in this plugin214 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP24850106
PO File2222673
JavaScript18725
CSS11010

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity11.00
▷ Minimum class complexity2.00
▷ Maximum class complexity20.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods10
▷ Static methods220.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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 images were found in this plugin