90% disable-media-sizes

Code Review | Disable Media Sizes

WordPress plugin Disable Media Sizes scored90%from 54 tests.

About plugin

  • Plugin page: disable-media-sizes
  • Plugin version: 1.9
  • PHP compatiblity: 5.6.20+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.4
  • WordPress version: 6.3.1
  • First release: Jul 31, 2020
  • Latest release: Oct 21, 2023
  • Number of updates: 15
  • Update frequency: every 78.5 days
  • Top authors: specialk (100%)

Code review

54 tests

User reviews

15 reviews

Install metrics

4,000+ active /23,700 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.07MB] [CPU: ▼9.05ms] Passed 4 tests

Server-side resources used by Disable Media Sizes
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0839.44 ▲2.28
Dashboard /wp-admin3.39 ▲0.0445.47 ▼15.14
Posts /wp-admin/edit.php3.50 ▲0.1444.93 ▼3.67
Add New Post /wp-admin/post-new.php5.97 ▲0.0881.79 ▼19.68
Media Library /wp-admin/upload.php3.31 ▲0.0834.65 ▲4.95
Disable Media Sizes /wp-admin/options-general.php?page=disable-media-sizes3.2832.05

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Disable Media Sizes
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲4714.51 ▲0.142.12 ▲0.3144.00 ▲0.15
Dashboard /wp-admin2,202 ▲245.59 ▼0.1179.96 ▼27.2738.36 ▼4.61
Posts /wp-admin/edit.php2,104 ▲41.97 ▼0.0138.41 ▲4.6635.75 ▼0.14
Add New Post /wp-admin/post-new.php1,529 ▼1023.70 ▲0.54676.46 ▲36.5158.95 ▲9.28
Media Library /wp-admin/upload.php1,404 ▲74.24 ▲0.05103.41 ▲2.9341.97 ▼4.19
Disable Media Sizes /wp-admin/options-general.php?page=disable-media-sizes9212.1623.1133.82

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: media, disable image sizes, images, uploads, disable

disable-media-sizes/disable-media-sizes.php Passed 13 tests

This is the main PHP file of "Disable Media Sizes" version 1.9, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
68 characters long description:
Provides options to disable the extra images generated by WordPress.

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 detected245 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP416038240
CSS1215

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
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%
Functions25
▷ Named functions25100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin