83% image-select-widget

Code Review | Image Select Widget

WordPress plugin Image Select Widget scored83%from 54 tests.

About plugin

  • Plugin page: image-select-widget
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-3.8
  • WordPress version: 6.3.1
  • First release: Jan 20, 2014
  • Latest release: Feb 4, 2014
  • Number of updates: 84
  • Update frequency: every 0.2 days
  • Top authors: bart96 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,283 total downloads

Benchmarks

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
Install script ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼8.04ms] Passed 4 tests

A check of server-side resources used by Image Select Widget
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1036.94 ▼3.43
Dashboard /wp-admin3.40 ▲0.0650.88 ▼11.74
Posts /wp-admin/edit.php3.45 ▲0.1049.87 ▼0.15
Add New Post /wp-admin/post-new.php6.00 ▲0.1291.88 ▼16.85
Media Library /wp-admin/upload.php3.33 ▲0.1036.12 ▲1.57

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 10 new files
Database: 3 new tables, 6 new options
New tables
wp_image_select_short
wp_image_select_content
wp_image_select_theme
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Image Select Widget
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,885 ▲13913.24 ▼1.161.68 ▼0.1439.88 ▼0.41
Dashboard /wp-admin2,289 ▲1015.88 ▲0.02107.28 ▲0.9541.00 ▼4.62
Posts /wp-admin/edit.php2,098 ▲92.00 ▲0.0141.01 ▼0.6135.12 ▲0.04
Add New Post /wp-admin/post-new.php1,520 ▼1317.69 ▼5.62632.47 ▲20.2446.70 ▼3.64
Media Library /wp-admin/upload.php1,397 ▲94.24 ▼0.03102.31 ▲8.8343.49 ▲1.21

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/image-select-widget/image-select.php:32

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === image-select-widget === )
You can take inspiration from this readme.txt

image-select-widget/image-select.php 77% from 13 tests

The primary PHP file in "Image Select Widget" version 1.1 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 341 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("image-select-widget.php" instead of "image-select.php")

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
Success! There were no dangerous files found in this plugin1,122 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP47527478
CSS2655281
JavaScript1851235
PO File15256128

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.61
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin