84% startklar-image-optimizer

Code Review | Startklar Image Optimizer

WordPress plugin Startklar Image Optimizer scored84%from 54 tests.

About plugin

  • Plugin page: startklar-image-o...
  • Plugin version: 1.0
  • PHP compatiblity: 5.6.20+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.0
  • WordPress version: 6.3.1
  • First release: Jun 16, 2022
  • Latest release: Jun 16, 2022
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: wshberlin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /892 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 gracefully, with no errors

Server metrics [RAM: ▲0.12MB] [CPU: ▼3.20ms] Passed 4 tests

This is a short check of server-side resources used by Startklar Image Optimizer
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1239.61 ▼2.61
Dashboard /wp-admin3.43 ▲0.1247.20 ▼0.48
Posts /wp-admin/edit.php3.54 ▲0.1846.65 ▲0.92
Add New Post /wp-admin/post-new.php6.01 ▲0.1286.93 ▼8.11
Media Library /wp-admin/upload.php3.35 ▲0.1235.36 ▼1.58

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Startklar Image Optimizer
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲8013.51 ▼0.864.52 ▲2.8044.74 ▼5.33
Dashboard /wp-admin2,224 ▲395.86 ▼0.0398.78 ▼16.9278.86 ▲30.93
Posts /wp-admin/edit.php2,107 ▲361.97 ▼0.0535.37 ▼0.7230.48 ▼4.43
Add New Post /wp-admin/post-new.php1,536 ▲318.28 ▼5.12669.72 ▼0.8670.29 ▲1.58
Media Library /wp-admin/upload.php1,403 ▲124.22 ▲0.02103.51 ▲5.7478.86 ▲37.22

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means 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 items
  • 34× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\Process\\Exception\\RuntimeException' not found in wp-content/plugins/startklar-image-optimizer/lib/image-optimizer/vendor/symfony/process/Exception/ProcessSignaledException.php:21
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\OptionsResolver\\Exception\\ExceptionInterface' not found in wp-content/plugins/startklar-image-optimizer/lib/image-optimizer/vendor/symfony/options-resolver/Exception/NoSuchOptionException.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\OptionsResolver\\Exception\\InvalidArgumentException' not found in wp-content/plugins/startklar-image-optimizer/lib/image-optimizer/vendor/symfony/options-resolver/Exception/MissingOptionsException.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/startklar-image-optimizer/lib/image-optimizer/vendor/psr/log/Psr/Log/Test/LoggerInterfaceTest.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\Process\\Exception\\RuntimeException' not found in wp-content/plugins/startklar-image-optimizer/lib/image-optimizer/vendor/symfony/process/Exception/ProcessTimedOutException.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'Psr\\Log\\AbstractLogger' not found in wp-content/plugins/startklar-image-optimizer/lib/image-optimizer/vendor/psr/log/Psr/Log/NullLogger.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\Process\\Pipes\\AbstractPipes' not found in wp-content/plugins/startklar-image-optimizer/lib/image-optimizer/vendor/symfony/process/Pipes/UnixPipes.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'ImageOptimizer\\Exception\\Exception' not found in wp-content/plugins/startklar-image-optimizer/lib/image-optimizer/vendor/ps/image-optimizer/src/ImageOptimizer/Exception/CommandNotFound.php:6
    • > PHP Fatal error
      Uncaught Error: Interface 'ImageOptimizer\\TypeGuesser\\TypeGuesser' not found in wp-content/plugins/startklar-image-optimizer/lib/image-optimizer/vendor/ps/image-optimizer/src/ImageOptimizer/TypeGuesser/SmartTypeGuesser.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'ImageOptimizer\\WrapperOptimizer' not found in wp-content/plugins/startklar-image-optimizer/lib/image-optimizer/vendor/ps/image-optimizer/src/ImageOptimizer/ChangedOutputOptimizer.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
3 plugin tags: performance, seo, optimization

startklar-image-optimizer/startklar_image_optimizer.php 92% from 13 tests

"Startklar Image Optimizer" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("startklar-image-optimizer.php" instead of "startklar_image_optimizer.php")

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 plugin4,961 lines of code in 94 files:
LanguageFilesBlank linesComment linesLines of code
PHP759902,5764,023
JSON700488
Markdown81110373
PO File1121246
YAML25025
CSS1106

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity10.20
▷ Minimum class complexity1.00
▷ Maximum class complexity158.00
Average method complexity2.92
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces15
Interfaces10
Traits2
Classes54
▷ Abstract classes35.56%
▷ Concrete classes5194.44%
▷ Final classes47.84%
Methods313
▷ Static methods3511.18%
▷ Public methods27688.18%
▷ Protected methods82.56%
▷ Private methods299.27%
Functions25
▷ Named functions936.00%
▷ Anonymous functions1664.00%
Constants40
▷ Global constants12.50%
▷ Class constants3997.50%
▷ Public constants3897.44%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
startklar_logo.png1.68KB0.85KB▼ 49.39%