78% quickwebp

Code Review | QuickWebP - Compress / Optimize Images & Convert WebP | SEO Friendly

WordPress plugin QuickWebP - Compress / Optimize Images & Convert WebP | SEO Friendly scored78%from 54 tests.

About plugin

  • Plugin page: quickwebp
  • Plugin version: 3.2.1
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-6.2.2
  • WordPress version: 6.3.1
  • First release: Feb 9, 2023
  • Latest release: Oct 5, 2023
  • Number of updates: 9
  • Update frequency: every 26.4 days
  • Top authors: ludwigyou (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

700+ active /2,557 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 gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼1.67ms] Passed 4 tests

This is a short check of server-side resources used by QuickWebP - Compress / Optimize Images & Convert WebP | SEO Friendly
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0537.79 ▼5.99
Dashboard /wp-admin3.35 ▲0.0548.80 ▲2.34
Posts /wp-admin/edit.php3.40 ▲0.0546.04 ▲2.37
Add New Post /wp-admin/post-new.php5.94 ▲0.0584.31 ▼2.17
Media Library /wp-admin/upload.php3.28 ▲0.0538.02 ▼0.84
Quickwebp /wp-admin/upload.php?page=quickwebp-settings3.3339.61

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 261 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by QuickWebP - Compress / Optimize Images & Convert WebP | SEO Friendly
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.72 ▲0.121.81 ▲0.0344.00 ▼2.17
Dashboard /wp-admin2,202 ▲225.62 ▲0.0293.55 ▲2.5341.90 ▲2.66
Posts /wp-admin/edit.php2,101 ▲12.00 ▲0.0433.22 ▼6.8935.60 ▼3.76
Add New Post /wp-admin/post-new.php1,536 ▲1023.22 ▲2.10673.03 ▲11.5262.09 ▲7.78
Media Library /wp-admin/upload.php1,408 ▲84.22 ▼0.01103.62 ▼11.2446.61 ▼0.19
Quickwebp /wp-admin/upload.php?page=quickwebp-settings1,3921.8226.8234.70

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
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/quickwebp/admin/templates/tab-media-paste.php
    • > /wp-content/plugins/quickwebp/admin/templates/button-media-paste.php
  • 154× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Intervention\\Image\\Commands\\AbstractCommand' not found in wp-content/plugins/quickwebp/includes/vendor/intervention/image/src/Intervention/Image/Gd/Commands/InvertCommand.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Intervention\\Image\\Commands\\AbstractCommand' not found in wp-content/plugins/quickwebp/includes/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/GreyscaleCommand.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Intervention\\Image\\Commands\\AbstractCommand' not found in wp-content/plugins/quickwebp/includes/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/PixelCommand.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Intervention\\Image\\Commands\\AbstractCommand' not found in wp-content/plugins/quickwebp/includes/vendor/intervention/image/src/Intervention/Image/Gd/Commands/ResetCommand.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Intervention\\Image\\Commands\\AbstractCommand' not found in wp-content/plugins/quickwebp/includes/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/FitCommand.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function sanitize_key() in wp-content/plugins/quickwebp/admin/components/textarea.php:6
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/quickwebp/includes/vendor/guzzlehttp/psr7/src/LimitStream.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Intervention\\Image\\AbstractShape' not found in wp-content/plugins/quickwebp/includes/vendor/intervention/image/src/Intervention/Image/Gd/Shapes/EllipseShape.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Intervention\\Image\\Commands\\AbstractCommand' not found in wp-content/plugins/quickwebp/includes/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/BlurCommand.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Intervention\\Image\\AbstractShape' not found in wp-content/plugins/quickwebp/includes/vendor/intervention/image/src/Intervention/Image/Imagick/Shapes/LineShape.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% 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
These attributes need your attention:
  • Tags: Please reduce the number of tags, currently 22 tag instead of maximum 10
The official readme.txt is a good inspiration

quickwebp/quickwebp.php 92% from 13 tests

The principal PHP file in "QuickWebP - Compress / Optimize Images & Convert WebP | SEO Friendly" v. 3.2.1 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 225 characters long)

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
Success! There were no dangerous files found in this plugin13,972 lines of code in 244 files:
LanguageFilesBlank linesComment linesLines of code
PHP2193,2596,58912,239
Markdown65180836
JSON800628
PO File17582246
SVG30010
YAML1007
CSS3003
JavaScript3003

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity8.42
▷ Minimum class complexity1.00
▷ Maximum class complexity80.00
Average method complexity2.78
▷ Minimum method complexity1.00
▷ Maximum method complexity50.00
Code structure
Namespaces16
Interfaces14
Traits2
Classes172
▷ Abstract classes84.65%
▷ Concrete classes16495.35%
▷ Final classes2213.41%
Methods876
▷ Static methods8810.05%
▷ Public methods73884.25%
▷ Protected methods657.42%
▷ Private methods738.33%
Functions40
▷ Named functions615.00%
▷ Anonymous functions3485.00%
Constants30
▷ Global constants516.67%
▷ Class constants2583.33%
▷ Public constants1456.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 7.63MB with 5.44MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/assets/img/second04.png3,271.99KB1,045.60KB▼ 68.04%
public/assets/img/second05.png4,536.35KB1,154.56KB▼ 74.55%