83% wp-custom-image-widget

Code Review | WP Custom Image Widget

WordPress plugin WP Custom Image Widget scored83%from 54 tests.

About plugin

  • Plugin page: wp-custom-image-w...
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-6.2
  • WordPress version: 6.3.1
  • First release: Aug 24, 2018
  • Latest release: Mar 30, 2023
  • Number of updates: 9
  • Update frequency: every 187.8 days
  • Top authors: yudiz (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /641 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.08MB] [CPU: ▼1.02ms] Passed 4 tests

Analyzing server-side resources used by WP Custom Image Widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1141.57 ▼2.13
Dashboard /wp-admin3.39 ▲0.0854.39 ▼0.19
Posts /wp-admin/edit.php3.50 ▲0.1553.12 ▲2.04
Add New Post /wp-admin/post-new.php5.97 ▲0.0893.17 ▼1.92
Media Library /wp-admin/upload.php3.29 ▲0.0637.41 ▲0.18

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_ciw_custom_image_widget
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by WP Custom Image Widget
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,305 ▲55916.38 ▲2.1322.18 ▲20.1838.98 ▼5.03
Dashboard /wp-admin2,342 ▲1516.43 ▲1.56112.05 ▼1.3239.41 ▼2.87
Posts /wp-admin/edit.php2,253 ▲1643.36 ▲1.3456.46 ▲21.4032.53 ▼3.85
Add New Post /wp-admin/post-new.php1,539 ▼318.32 ▼0.33615.47 ▼3.3733.50 ▼24.30
Media Library /wp-admin/upload.php1,381 ▼14.13 ▼0.0678.80 ▼21.2844.73 ▲2.20

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_ciw_custom_image_widget
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means 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
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-custom-image-widget/custom_widget.php:14

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 75% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Screenshots: Add descriptions for screenshots #2, #3 in wp-custom-image-widget/assets to your readme.txt
  • Stable tag: Not defined
  • License: Not defined
  • License uri: Invalid url: ""
You can look at the official readme.txt

wp-custom-image-widget/custom_widget.php 92% from 13 tests

"WP Custom Image Widget" version 2.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("wp-custom-image-widget.php" instead of "custom_widget.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin240 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP11314196
JavaScript21044

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity57.00
▷ Minimum class complexity57.00
▷ Maximum class complexity57.00
Average method complexity15.00
▷ Minimum method complexity1.00
▷ Maximum method complexity32.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin