78% wp-optimize

Code Review | WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance

WordPress plugin WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance scored78%from 54 tests.

About plugin

  • Plugin page: wp-optimize
  • Plugin version: 3.2.22
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.4
  • WordPress version: 6.3.1
  • First release: Jan 21, 2009
  • Latest release: Nov 22, 2023
  • Number of updates: 265
  • Update frequency: every 20.5 days
  • Top authors: ruhanirabin (50.94%)DavidAnderson (49.43%)

Code review

54 tests

User reviews

2181 reviews

Install metrics

1,000,000+ active /34,842,927 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲2.91MB] [CPU: ▲24.47ms] Passed 4 tests

An overview of server-side resources used by WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /6.31 ▲2.8466.39 ▲17.38
Dashboard /wp-admin6.36 ▲3.0676.92 ▲27.45
Posts /wp-admin/edit.php6.33 ▲2.9772.96 ▲25.88
Add New Post /wp-admin/post-new.php8.82 ▲2.93120.60 ▲27.16
Media Library /wp-admin/upload.php6.14 ▲2.9064.80 ▲29.71
Help /wp-admin/admin.php?page=wpo_support7.22109.20
Cache /wp-admin/admin.php?page=wpo_cache7.2199.69
Settings /wp-admin/admin.php?page=wpo_settings7.2198.08
Premium Upgrade /wp-admin/admin.php?page=wpo_mayalso7.2197.90
Database /wp-admin/admin.php?page=WP-Optimize7.2193.94
Images /wp-admin/admin.php?page=wpo_images7.2191.95
Minify /wp-admin/admin.php?page=wpo_minify7.2196.08

Server storage [IO: ▲7.36MB] [DB: ▲0.01MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 850 new files
Database: 2 new tables, 34 new options
New tables
wp_tm_taskmeta
wp_tm_tasks
New WordPress options
widget_theysaidso_widget
wp-optimize-compression_server
wp-optimize-corrupted-tables-count
wp-optimize-back_up_delete_after_days
wp-optimize-last-optimized
can_compress_scripts
db_upgraded
wp-optimize-webp_conversion_test
wpo_minify_config
wp-optimize-image_quality
...

Browser metrics Passed 4 tests

WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,966 ▲20414.35 ▲0.111.78 ▲0.0142.47 ▼1.66
Dashboard /wp-admin2,369 ▲1925.69 ▲0.11102.43 ▲0.6588.40 ▲39.49
Posts /wp-admin/edit.php2,230 ▲1302.10 ▲0.0841.99 ▲1.6732.46 ▼6.56
Add New Post /wp-admin/post-new.php1,579 ▲5323.08 ▼0.57648.09 ▲7.8951.72 ▲4.29
Media Library /wp-admin/upload.php1,526 ▲1234.28 ▲0.08100.12 ▲1.5541.05 ▼1.23
Help /wp-admin/admin.php?page=wpo_support5,1253.2580.5576.03
Cache /wp-admin/admin.php?page=wpo_cache5,1383.1879.5759.23
Settings /wp-admin/admin.php?page=wpo_settings5,1363.1369.5380.67
Premium Upgrade /wp-admin/admin.php?page=wpo_mayalso5,1553.1869.6582.49
Database /wp-admin/admin.php?page=WP-Optimize6,1053.0194.3364.64
Images /wp-admin/admin.php?page=wpo_images5,1653.2571.6992.09
Minify /wp-admin/admin.php?page=wpo_minify5,1373.1564.6171.44

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
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 162× PHP files output non-empty strings when accessed directly via GET requests (only 10 are shown):
    • > /wp-content/plugins/wp-optimize/compatibility/class-wpo-polylang-compatibility.php
    • > /wp-content/plugins/wp-optimize/optimizations/commentmeta.php
    • > /wp-content/plugins/wp-optimize/minify/class-wp-optimize-minify-functions.php
    • > /wp-content/plugins/wp-optimize/includes/class-updraft-smush-manager.php
    • > /wp-content/plugins/wp-optimize/cache/class-wpo-page-cache.php
    • > /wp-content/plugins/wp-optimize/vendor/mrclay/minify/server-info.php
    • > /wp-content/plugins/wp-optimize/includes/class-re-smush-it-task.php
    • > /wp-content/plugins/wp-optimize/minify/class-wp-optimize-minify-cache-functions.php
    • > /wp-content/plugins/wp-optimize/templates/notices/horizontal-notice.php
    • > /wp-content/plugins/wp-optimize/templates/images/lazyload.php
  • 217× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\StreamHandler' not found in wp-content/plugins/wp-optimize/vendor/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php:27
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Container\otFoundExceptionInterface' not found in wp-content/plugins/wp-optimize/vendor/pimple/pimple/src/Pimple/Exception/UnknownIdentifierException.php:36
    • > PHP Fatal error
      Uncaught Error: Class 'ImageMimeTypeGuesser\\Detectors\\AbstractDetector' not found in wp-content/plugins/wp-optimize/vendor/rosell-dk/image-mime-type-guesser/src/Detectors/MimeContentType.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WebPConvert\\Exceptions\\WebPConvertException' not found in wp-content/plugins/wp-optimize/vendor/rosell-dk/webp-convert/src/Serve/Exceptions/ServeFailedException.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WebPConvert\\Convert\\Exceptions\\ConversionFailed\\InvalidInputException' not found in wp-content/plugins/wp-optimize/vendor/rosell-dk/webp-convert/src/Convert/Exceptions/ConversionFailed/InvalidInput/ConverterNotFoundException.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Minify_Controller_Base' not found in wp-content/plugins/wp-optimize/vendor/mrclay/minify/lib/Minify/Controller/MinApp.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Intervention\\HttpAuth\\Token\ullToken' not found in wp-content/plugins/wp-optimize/vendor/intervention/httpauth/src/Token/HttpAuthentification.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\AbstractProcessingHandler' not found in wp-content/plugins/wp-optimize/vendor/monolog/monolog/src/Monolog/Handler/AmqpHandler.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\GroupHandler' not found in wp-content/plugins/wp-optimize/vendor/monolog/monolog/src/Monolog/Handler/FallbackGroupHandler.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/wp-optimize/vendor/pimple/pimple/src/Pimple/Tests/Psr11/ServiceLocatorTest.php:39

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #7 (Settings), #8 (Real world tests show the cache feature alone can make your site faster than any other caching plugin), #9 (Features comparison)
You can look at the official readme.txt

wp-optimize/wp-optimize.php 92% from 13 tests

This is the main PHP file of "WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance" version 3.2.22, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 150 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin101,163 lines of code in 759 files:
LanguageFilesBlank linesComment linesLines of code
PHP55717,44341,13176,798
JavaScript482,7793,32516,245
CSS173911093,745
JSON9001,970
Markdown11558901,952
YAML390215
reStructuredText19613997
XML52087
Bourne Shell110125
LESS261219
HTML10010

PHP code 50% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
Please tend to the following items
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 117)
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity27.44
▷ Minimum class complexity1.00
▷ Maximum class complexity668.00
Average method complexity4.23
▷ Minimum method complexity1.00
▷ Maximum method complexity117.00
Code structure
Namespaces62
Interfaces19
Traits14
Classes451
▷ Abstract classes245.32%
▷ Concrete classes42794.68%
▷ Final classes40.94%
Methods4,106
▷ Static methods42810.42%
▷ Public methods3,10775.67%
▷ Protected methods57213.93%
▷ Private methods42710.40%
Functions179
▷ Named functions6335.20%
▷ Anonymous functions11664.80%
Constants509
▷ Global constants27854.62%
▷ Class constants23145.38%
▷ Public constants20990.48%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
41 compressed PNG files occupy 0.15MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/notices/keyy_logo.png2.25KB1.19KB▼ 47.19%
images/notices/updraft_logo.png3.06KB3.38KB0.00%
images/features/geolocation.png6.19KB6.59KB0.00%
images/features/updraftcentral_logo.png2.60KB2.73KB0.00%
images/features/auto-optimize.png0.97KB0.99KB0.00%