90% better-image-sizes

Code Review | Better image sizes

WordPress plugin Better image sizes scored90%from 54 tests.

About plugin

  • Plugin page: better-image-sizes
  • Plugin version: 3.5
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.4
  • WordPress version: 6.3.1
  • First release: Nov 18, 2022
  • Latest release: Oct 25, 2023
  • Number of updates: 39
  • Update frequency: every 8.7 days
  • Top authors: kubiq (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

300+ active /3,117 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▼5.65ms] Passed 4 tests

A check of server-side resources used by Better image sizes
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0540.22 ▼0.81
Dashboard /wp-admin3.33 ▲0.0350.43 ▲3.18
Posts /wp-admin/edit.php3.44 ▲0.0944.94 ▼5.05
Add New Post /wp-admin/post-new.php5.93 ▲0.0584.43 ▼14.34
Media Library /wp-admin/upload.php3.25 ▲0.0332.65 ▼2.40
Better image sizes /wp-admin/tools.php?page=better-image-sizes/better-image-sizes.php3.2231.31

Server storage [IO: ▲0.71MB] [DB: ▲0.07MB] Passed 3 tests

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Better image sizes
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,797 ▲3614.35 ▼0.201.79 ▲0.0943.18 ▼1.13
Dashboard /wp-admin2,200 ▲235.58 ▼0.1088.32 ▼9.4938.37 ▼5.20
Posts /wp-admin/edit.php2,108 ▲52.02 ▲0.0535.73 ▼9.8533.66 ▼11.48
Add New Post /wp-admin/post-new.php1,533 ▼423.46 ▲5.33627.20 ▲4.5062.07 ▼0.04
Media Library /wp-admin/upload.php1,405 ▲54.21 ▲0.0299.57 ▲0.0843.36 ▼2.56
Better image sizes /wp-admin/tools.php?page=better-image-sizes/better-image-sizes.php9172.1531.7932.33

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

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 everything seems fine, this is not an exhaustive test

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
7 plugin tags: optimize, images, responsive, retina, sizes...

better-image-sizes/better-image-sizes.php 92% from 13 tests

The primary PHP file in "Better image sizes" version 3.5 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Domain Path: The domain path is invalid: folder "/languages" does not exist

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
No dangerous file extensions were detected874 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP410326736
CSS10073
JavaScript15065

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of 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 complexity32.25
▷ Minimum class complexity1.00
▷ Maximum class complexity91.00
Average method complexity5.44
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods30
▷ Static methods00.00%
▷ Public methods2686.67%
▷ Protected methods413.33%
▷ Private methods00.00%
Functions9
▷ Named functions666.67%
▷ Anonymous functions333.33%
Constants2
▷ Global constants2100.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
No PNG files were detected