78% another-simple-image-optimizer

Code Review | Another simple image optimizer

WordPress plugin Another simple image optimizer scored78%from 54 tests.

About plugin

  • Plugin page: another-simple-im...
  • Plugin version: 0.2.1
  • PHP compatiblity: 8.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9-6.4
  • WordPress version: 6.3.1
  • First release: Apr 25, 2023
  • Latest release: Nov 13, 2023
  • Number of updates: 10
  • Update frequency: every 20.5 days
  • Top authors: raffaelj (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /247 total downloads


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.09MB] [CPU: ▼1.20ms] Passed 4 tests

An overview of server-side resources used by Another simple image optimizer
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0940.55 ▼6.91
Dashboard /wp-admin3.40 ▲0.0954.15 ▲4.76
Posts /wp-admin/edit.php3.51 ▲0.1550.28 ▲4.30
Add New Post /wp-admin/post-new.php5.98 ▲0.0994.55 ▼4.24
Media Library /wp-admin/upload.php3.32 ▲0.0936.25 ▲2.04
Image optimizer /wp-admin/options-general.php?page=simple-image-optimizer3.3028.67

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 74 new files
Database: no new tables, 7 new options
New WordPress options

Browser metrics Passed 4 tests

Another simple image optimizer: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,796 ▲3414.74 ▲0.421.77 ▼0.4043.42 ▲0.14
Dashboard /wp-admin2,201 ▲215.60 ▼0.0890.36 ▼6.3139.41 ▼8.73
Posts /wp-admin/edit.php2,103 ▲32.03 ▲0.0540.53 ▲2.5637.89 ▲2.33
Add New Post /wp-admin/post-new.php1,531 ▲523.14 ▼0.00682.46 ▼16.4056.22 ▼2.78
Media Library /wp-admin/upload.php1,409 ▲94.25 ▲0.1099.74 ▲1.7140.34 ▼3.16
Image optimizer /wp-admin/options-general.php?page=simple-image-optimizer6871.516.6915.64

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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • recovery_mode_email_last_sent
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=simple-image-optimizer
    • > Parse error in wp-content/plugins/another-simple-image-optimizer/AnotherSimpleImageOptimizer.php+22
    syntax error, unexpected '|', expecting ';' or '{'

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 26× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Parse error
      syntax error, unexpected '=>' (T_DOUBLE_ARROW) in wp-content/plugins/another-simple-image-optimizer/vendor/symfony/process/Exception/ProcessTimedOutException.php on line 68
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\Process\\Exception\\ExceptionInterface' not found in wp-content/plugins/another-simple-image-optimizer/vendor/symfony/process/Exception/InvalidArgumentException.php:19
    • > PHP Parse error
      syntax error, unexpected 'static' (T_STATIC) in wp-content/plugins/another-simple-image-optimizer/vendor/symfony/process/Process.php on line 190
    • > PHP Parse error
      syntax error, unexpected '|', expecting variable (T_VARIABLE) in wp-content/plugins/another-simple-image-optimizer/vendor/psr/log/src/NullLogger.php on line 26
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\Process\\Exception\\RuntimeException' not found in wp-content/plugins/another-simple-image-optimizer/vendor/symfony/process/Exception/ProcessSignaledException.php:21
    • > PHP Parse error
      syntax error, unexpected '|', expecting ';' or '{' in wp-content/plugins/another-simple-image-optimizer/vendor/symfony/process/PhpExecutableFinder.php on line 32
    • > PHP Parse error
      syntax error, unexpected 'static' (T_STATIC) in wp-content/plugins/another-simple-image-optimizer/vendor/symfony/process/PhpProcess.php on line 53
    • > PHP Fatal error
      Uncaught Error: Class 'Spatie\\ImageOptimizer\\Optimizers\\BaseOptimizer' not found in wp-content/plugins/another-simple-image-optimizer/vendor/spatie/image-optimizer/src/Optimizers/Jpegoptim.php:7
    • > PHP Parse error
      syntax error, unexpected '|', expecting variable (T_VARIABLE) in wp-content/plugins/another-simple-image-optimizer/vendor/psr/log/src/LoggerInterface.php on line 30
    • > PHP Fatal error
      Uncaught Error: Class 'Spatie\\ImageOptimizer\\Optimizers\\BaseOptimizer' not found in wp-content/plugins/another-simple-image-optimizer/vendor/spatie/image-optimizer/src/Optimizers/Optipng.php:7

User-side errors Passed 1 test

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


Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Donate link: Invalid URI found ("")
You can look at the official readme.txt

another-simple-image-optimizer/plugin.php 85% from 13 tests

The entry point to "Another simple image optimizer" version 0.2.1 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("another-simple-image-optimizer.php" instead of "plugin.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 175 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected4,107 lines of code in 67 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity11.16
▷ Minimum class complexity1.00
▷ Maximum class complexity171.00
Average method complexity2.87
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
▷ Abstract classes38.33%
▷ Concrete classes3391.67%
▷ Final classes13.03%
▷ Static methods3112.40%
▷ Public methods22389.20%
▷ Protected methods104.00%
▷ Private methods176.80%
▷ Named functions00.00%
▷ Anonymous functions13100.00%
▷ Global constants00.00%
▷ Class constants24100.00%
▷ Public constants24100.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
There are no PNG files in this plugin