83% wp-image-sizes

Code Review | WP Image Sizes

WordPress plugin WP Image Sizes scored83%from 54 tests.

About plugin

  • Plugin page: wp-image-sizes
  • Plugin version: 1.1.3
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.7.2
  • WordPress version: 6.3.1
  • First release: Oct 27, 2020
  • Latest release: May 27, 2021
  • Number of updates: 24
  • Update frequency: every 8.9 days
  • Top authors: aiwatech (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active /1,555 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

This is a short check of server-side resources used by WP Image Sizes
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0639.80 ▼5.11
Dashboard /wp-admin3.36 ▲0.0151.61 ▼12.11
Posts /wp-admin/edit.php3.41 ▲0.0553.69 ▼6.51
Add New Post /wp-admin/post-new.php5.50 ▼0.3977.21 ▼30.33
Media Library /wp-admin/upload.php3.26 ▲0.0231.64 ▼5.37
WP Image Sizes /wp-admin/options-general.php?page=wpis3.2536.38

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

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

Browser metrics Passed 4 tests

Checking browser requirements for WP Image Sizes
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲5113.68 ▼0.674.84 ▲3.1343.04 ▼3.33
Dashboard /wp-admin2,218 ▲384.82 ▼0.8592.56 ▲4.1440.30 ▼0.41
Posts /wp-admin/edit.php2,129 ▲222.30 ▲0.1839.60 ▼1.5338.55 ▲2.45
Add New Post /wp-admin/post-new.php6,264 ▲4,73621.71 ▼1.39917.33 ▲204.3935.38 ▼19.45
Media Library /wp-admin/upload.php1,490 ▲874.54 ▲0.37107.82 ▲6.2742.75 ▼2.47
WP Image Sizes /wp-admin/options-general.php?page=wpis9741.9330.8834.36

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • wpis_session
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These errors were triggered by the plugin
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wpis
    • > Notice in wp-content/plugins/wp-image-sizes/includes/wpis-settings.php+10
    Trying to access array offset on value of type bool
  • 21 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wpis
    • > Notice in wp-content/plugins/wp-image-sizes/includes/tab-templates/image-sizes.php+56
    Trying to access array offset on value of type null

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Tags: Please reduce the number of tags, currently 13 tag instead of maximum 10
Please take inspiration from this readme.txt

wp-image-sizes/wp-image-sizes.php 85% from 13 tests

Analyzing the main PHP file in "WP Image Sizes" version 1.1.3
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: Please don't use more than 140 characters for the plugin description (currently 184 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected623 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP49627468
CSS130126
JavaScript26029

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.52
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%
Functions13
▷ Named functions13100.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 files were detected