90% optimize-images-resizing

Code Review | Optimize Images Resizing

WordPress plugin Optimize Images Resizing scored 90% from 54 tests.

About plugin

  • Plugin page: optimize-images-r...
  • Plugin version: 1.4.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.7
  • WordPress version: 6.3.1
  • First release: Jun 18, 2014
  • Latest release: Dec 17, 2016
  • Number of updates: 27
  • Update frequency: every 33.8 days
  • Top authors: OriginalEXE (100%)

Code review

54 tests

User reviews

45 reviews

Install metrics

10,000+ active / 85,882 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.06MB] [CPU: ▼1.36ms] Passed 4 tests

A check of server-side resources used by Optimize Images Resizing
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0338.16 ▼2.20
Dashboard /wp-admin3.37 ▲0.0746.45 ▼1.82
Posts /wp-admin/edit.php3.48 ▲0.1350.03 ▲1.32
Add New Post /wp-admin/post-new.php5.95 ▲0.0689.35 ▼2.05
Media Library /wp-admin/upload.php3.29 ▲0.0634.83 ▲0.62
Remove image sizes /wp-admin/tools.php?page=optimize-images-resizing3.2631.27

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
db_upgraded
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Optimize Images Resizing
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲3314.74 ▲0.361.91 ▼0.1541.66 ▼1.79
Dashboard /wp-admin2,210 ▲224.81 ▼0.06112.26 ▼4.4441.05 ▲0.76
Posts /wp-admin/edit.php2,096 ▲42.06 ▲0.0942.14 ▼0.5035.83 ▼0.31
Add New Post /wp-admin/post-new.php1,541 ▲2723.23 ▲5.41689.43 ▲2.7657.47 ▲5.86
Media Library /wp-admin/upload.php1,395 ▲104.17 ▼0.00101.88 ▲0.8142.28 ▼3.04
Remove image sizes /wp-admin/tools.php?page=optimize-images-resizing7802.0429.5326.61

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
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
The SRP test was a success

User-side errors Passed 1 test

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

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: remove, resizing, cleanup, clean, resize...

optimize-images-resizing/optimize-images-resizing.php Passed 13 tests

The main file in "Optimize Images Resizing" v. 1.4.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
68 characters long description:
Improve WordPress image sizes generation and save your hosting space

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin455 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP320852301
JavaScript148374
PO File2121272
CSS1108

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity16.33
▷ Minimum class complexity11.00
▷ Maximum class complexity24.00
Average method complexity3.71
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes3100.00%
Methods17
▷ Static methods423.53%
▷ Public methods1588.24%
▷ Protected methods00.00%
▷ Private methods211.76%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected