10% aspose-image-optimizer

Code Review | Aspose Image Optimizer

WordPress plugin Aspose Image Optimizer scored10%from 54 tests.

About plugin

  • Plugin page: aspose-image-opti...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.2.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-5.9
  • WordPress version: 6.3.1
  • First release: Jan 25, 2022
  • Latest release: Jan 31, 2022
  • Number of updates: 4
  • Update frequency: every 1.5 days
  • Top authors: asposemarketplace (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /598 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The following installer errors require your attention
  • The plugin did not install without errors
    • > Warning in wp-content/plugins/aspose-image-optimizer/plugin.php+26
    require_once(wp-content/plugins/aspose-image-optimizer/core/class-installer.php): failed to open stream: No such file or directory

Server metrics [RAM: ▲0.00MB] [CPU: ▼3.75ms] Passed 4 tests

This is a short check of server-side resources used by Aspose Image Optimizer
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0040.43 ▲1.33
Dashboard /wp-admin3.31 ▲0.0046.56 ▼1.74
Posts /wp-admin/edit.php3.36 ▲0.0051.22 ▼3.42
Add New Post /wp-admin/post-new.php5.89 ▲0.0085.20 ▼9.60
Media Library /wp-admin/upload.php3.23 ▲0.0037.26 ▼0.23

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 507 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Aspose Image Optimizer
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.30 ▼1.295.65 ▲3.9946.20 ▲5.38
Dashboard /wp-admin2,200 ▲125.83 ▼0.07128.22 ▲20.0545.50 ▲1.36
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0639.25 ▼0.4234.31 ▼1.76
Add New Post /wp-admin/post-new.php1,514 ▼1617.48 ▼0.77677.27 ▼3.4453.16 ▼10.35
Media Library /wp-admin/upload.php1,388 ▼34.18 ▼0.0493.90 ▼8.7143.41 ▼5.79

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 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)
Good news, no errors were detected

SRP 50% from 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
Almost there! Just fix the following items
  • 198× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Promise\\PromiseInterface' not found in wp-content/plugins/aspose-image-optimizer/vendor/guzzlehttp/promises/src/Coroutine.php:45
    • > PHP Fatal error
      Uncaught Error: Class 'Aspose\\Imaging\\Tests\\Api\\AI\\TestImagingAiBase' not found in wp-content/plugins/aspose-image-optimizer/vendor/aspose/aspose-imaging-cloud/tests/Aspose/Imaging/Tests/Api/AI/FindImagesTest.php:39
    • > PHP Fatal error
      Uncaught Error: Class 'Aspose\\Imaging\\Model\\DeconvolutionFilterProperties' not found in wp-content/plugins/aspose-image-optimizer/vendor/aspose/aspose-imaging-cloud/lib/Aspose/Imaging/Model/GaussWienerFilterProperties.php:37
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/aspose-image-optimizer/vendor/guzzlehttp/psr7/src/MultipartStream.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Aspose\\Imaging\\Model\\Requests\\ImagingRequest' not found in wp-content/plugins/aspose-image-optimizer/vendor/aspose/aspose-imaging-cloud/lib/Aspose/Imaging/Model/Requests/CreateUpdatedImageRequest.php:39
    • > PHP Fatal error
      Uncaught Error: Class 'Aspose\\Imaging\\Tests\\Base\\ApiTester' not found in wp-content/plugins/aspose-image-optimizer/vendor/aspose/aspose-imaging-cloud/tests/Aspose/Imaging/Tests/Api/LoadCustomFontsTest.php:41
    • > PHP Fatal error
      Uncaught Error: Class 'Aspose\\Imaging\\Examples\\ImagingBase' not found in wp-content/plugins/aspose-image-optimizer/vendor/aspose/aspose-imaging-cloud/Examples/lib/GrayscaleImage.php:42
    • > PHP Fatal error
      Uncaught Error: Class 'Aspose\\Imaging\\Model\\Requests\\ImagingRequest' not found in wp-content/plugins/aspose-image-optimizer/vendor/aspose/aspose-imaging-cloud/lib/Aspose/Imaging/Model/Requests/GetObjectBoundsRequest.php:39
    • > PHP Fatal error
      Uncaught Error: Class 'Aspose\\Imaging\\Model\\ConvolutionFilterProperties' not found in wp-content/plugins/aspose-image-optimizer/vendor/aspose/aspose-imaging-cloud/lib/Aspose/Imaging/Model/SharpenFilterProperties.php:37
    • > PHP Fatal error
      Uncaught Error: Class 'Aspose\\Imaging\\Model\\Requests\\ImagingRequest' not found in wp-content/plugins/aspose-image-optimizer/vendor/aspose/aspose-imaging-cloud/lib/Aspose/Imaging/Model/Requests/GetImageFeaturesRequest.php:39

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed: The official readme.txt might help

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

"Aspose Image Optimizer" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("5.0" instead of "5.3")
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("aspose-image-optimizer.php" instead of "plugin.php")

Code Analysis 97% from 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
Good job! No executable or dangerous file extensions detected77,275 lines of code in 444 files:
LanguageFilesBlank linesComment linesLines of code
PHP3449,72635,94060,843
Markdown722,42207,459
JavaScript35002,3586,051
CSS3242081,456
JSON13001,264
YAML522391
LESS1185978
XML10014
Dockerfile18010
make1409

PHP code 50% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
The following items need your attention
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 179)
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity16.83
▷ Minimum class complexity1.00
▷ Maximum class complexity197.00
Average method complexity2.29
▷ Minimum method complexity1.00
▷ Maximum method complexity179.00
Code structure
Namespaces24
Interfaces16
Traits2
Classes296
▷ Abstract classes51.69%
▷ Concrete classes29198.31%
▷ Final classes237.90%
Methods3,877
▷ Static methods47212.17%
▷ Public methods3,63793.81%
▷ Protected methods621.60%
▷ Private methods1784.59%
Functions453
▷ Named functions7316.11%
▷ Anonymous functions38083.89%
Constants228
▷ Global constants4419.30%
▷ Class constants18480.70%
▷ Public constants184100.00%

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.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
vendor/aspose/aspose-imaging-cloud/testdata/test.png8.52KB3.79KB▼ 55.56%