77% max-image-size-control

Code Review | Max Image Size Control

WordPress plugin Max Image Size Control scored77%from 54 tests.

About plugin

  • Plugin page: max-image-size-co...
  • Plugin version: 0.2.7
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7-5.3
  • WordPress version: 6.3.1
  • First release: May 16, 2009
  • Latest release: Nov 28, 2019
  • Number of updates: 32
  • Update frequency: every 120.3 days
  • Top authors: Hiroaki Miyashita (100%)

Code review

54 tests

User reviews

1 review

Install metrics

600+ active /32,540 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
Install script ran successfully

Server metrics [RAM: ▼0.19MB] [CPU: ▼12.65ms] Passed 4 tests

A check of server-side resources used by Max Image Size Control
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.05 ▼5.71
Dashboard /wp-admin3.32 ▼0.0247.18 ▼17.11
Posts /wp-admin/edit.php3.38 ▲0.0245.05 ▼1.97
Add New Post /wp-admin/post-new.php5.15 ▼0.7367.33 ▼25.79
Media Library /wp-admin/upload.php3.22 ▼0.0137.53 ▲5.01

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Max Image Size Control
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,796 ▲3514.42 ▲0.141.68 ▼0.0340.48 ▼1.71
Dashboard /wp-admin2,202 ▲255.65 ▲0.0790.76 ▼5.0839.31 ▼1.58
Posts /wp-admin/edit.php2,107 ▲71.99 ▲0.0536.25 ▼1.0430.46 ▼4.54
Add New Post /wp-admin/post-new.php1,534 ▲623.28 ▲0.29682.29 ▲55.6252.48 ▲2.30
Media Library /wp-admin/upload.php1,407 ▲44.19 ▼0.06110.72 ▲10.8545.86 ▲1.71
Max Image Size Control /wp-admin/max-image-size-control.php260.420.1113.86

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not 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
Please fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/max-image-size-control/max-image-size-control.php:34

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please take a look at the following user-side issues
    • > GET request to /wp-admin/max-image-size-control.php
    • > Network (severe)
    wp-admin/max-image-size-control.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
  • Screenshots: Please add an image for screenshot #1 (Max Image Size Control - Settings)
You can take inspiration from this readme.txt

max-image-size-control/max-image-size-control.php 85% from 13 tests

Analyzing the main PHP file in "Max Image Size Control" version 0.2.7
It is important to fix the following:
  • Domain Path: Please prefix the domain path with a forward slash character ("//")
  • Domain Path: The domain path should use only dashes and lowercase characters ("/")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected1,022 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PO File93141,336599
PHP14328423

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity112.00
▷ Minimum class complexity112.00
▷ Maximum class complexity112.00
Average method complexity10.25
▷ Minimum method complexity1.00
▷ Maximum method complexity56.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
1 compressed PNG file occupies 0.02MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png18.58KB17.43KB▼ 6.19%