72% servebolt-optimizer

Code Review | Servebolt Optimizer

WordPress plugin Servebolt Optimizer scored72%from 54 tests.

About plugin

  • Plugin page: servebolt-optimizer
  • Plugin version: 3.5.25
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.2-6.4.1
  • WordPress version: 6.3.1
  • First release: Jan 15, 2018
  • Latest release: Nov 29, 2023
  • Number of updates: 244
  • Update frequency: every 8.8 days
  • Top authors: servebolt (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

1,000+ active /54,675 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲2.09MB] [CPU: ▲15.96ms] Passed 4 tests

Analyzing server-side resources used by Servebolt Optimizer
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.93 ▲1.4754.32 ▲11.20
Dashboard /wp-admin5.61 ▲2.3065.97 ▲15.46
Posts /wp-admin/edit.php5.66 ▲2.3070.02 ▲21.59
Add New Post /wp-admin/post-new.php8.20 ▲2.32107.08 ▲15.57
Media Library /wp-admin/upload.php5.53 ▲2.3061.30 ▲29.43
/wp-admin/options.php?page=servebolt-cf-image-resizing5.5551.01
/wp-admin/options.php?page=servebolt-performance-optimizer-database5.5857.58
/wp-admin/options.php?page=servebolt-fpc5.5451.74
Performance Optimizer /wp-admin/admin.php?page=servebolt-performance-optimizer5.5150.43
/wp-admin/options.php?page=servebolt-cf-cache-control5.5449.32
/wp-admin/options.php?page=servebolt-performance-tools5.5449.92
General Settings /wp-admin/admin.php?page=servebolt-general-settings5.5249.49
/wp-admin/options.php?page=servebolt-menu-optimizer5.5759.00
/wp-admin/options.php?page=servebolt-menu-cache5.5449.22
Cache /wp-admin/admin.php?page=servebolt-cache-purge-control5.6054.69

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 576 new files
Database: 1 new table, 8 new options
New tables
wp_sb_queue
New WordPress options
servebolt_ajax_nonce
widget_recent-posts
widget_theysaidso_widget
servebolt_migration_version
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

Servebolt Optimizer: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,038 ▲29113.42 ▼0.8611.31 ▲9.6541.51 ▼2.49
Dashboard /wp-admin2,334 ▲1605.65 ▼0.0382.77 ▼16.0275.74 ▲34.19
Posts /wp-admin/edit.php2,219 ▲1162.39 ▲0.4436.95 ▼3.0333.53 ▼2.69
Add New Post /wp-admin/post-new.php1,875 ▲34922.86 ▼0.30777.83 ▲70.2238.27 ▼17.43
Media Library /wp-admin/upload.php1,546 ▲1434.30 ▲0.1186.09 ▼7.5994.81 ▲52.56
/wp-admin/options.php?page=servebolt-cf-image-resizing9772.3124.4536.39
/wp-admin/options.php?page=servebolt-performance-optimizer-database1,0822.2122.4632.26
/wp-admin/options.php?page=servebolt-fpc7941.527.1624.58
Performance Optimizer /wp-admin/admin.php?page=servebolt-performance-optimizer9982.3123.4531.82
/wp-admin/options.php?page=servebolt-cf-cache-control2,0072.6630.6651.30
/wp-admin/options.php?page=servebolt-performance-tools1,7172.9127.5660.58
General Settings /wp-admin/admin.php?page=servebolt-general-settings1,0032.1822.6032.07
/wp-admin/options.php?page=servebolt-menu-optimizer1,1282.1829.4133.01
/wp-admin/options.php?page=servebolt-menu-cache1,8502.7229.3753.81
Cache /wp-admin/admin.php?page=servebolt-cache-purge-control1,2852.2426.8229.22

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
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded

Smoke tests 25% 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
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options.php?page=servebolt-menu-optimizer
    • > request to
    • > Notice in wp-config.php+20
    Undefined index: REQUEST_METHOD

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 172× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Servebolt\\Optimizer\\Dependencies\\GuzzleHttp\\Promise\\RejectionException' not found in wp-content/plugins/servebolt-optimizer/src/Dependencies/GuzzleHttp/Promise/AggregateException.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/servebolt-optimizer/vendor/composer/installers/src/Composer/Installers/MiaoxingInstaller.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/servebolt-optimizer/vendor/composer/installers/src/Composer/Installers/PiwikInstaller.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'Servebolt\\Optimizer\\Dependencies\\Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/servebolt-optimizer/src/Dependencies/GuzzleHttp/Psr7/MultipartStream.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Servebolt\\Optimizer\\Dependencies\\Servebolt\\Sdk\\Endpoints\\AbstractEndpoint' not found in wp-content/plugins/servebolt-optimizer/src/Dependencies/Servebolt/Sdk/Endpoints/Environment.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'Servebolt\\Optimizer\\Dependencies\\Psr\\Http\\Client\\ClientExceptionInterface' not found in wp-content/plugins/servebolt-optimizer/src/Dependencies/Psr/Http/Client/NetworkExceptionInterface.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/servebolt-optimizer/vendor/composer/installers/src/Composer/Installers/TuskInstaller.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'Servebolt\\Optimizer\\Dependencies\\Psr\\Http\\Message\\MessageInterface' not found in wp-content/plugins/servebolt-optimizer/src/Dependencies/Psr/Http/Message/ResponseInterface.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'Servebolt\\Optimizer\\Exceptions\\ApiError' not found in wp-content/plugins/servebolt-optimizer/src/Servebolt/Exceptions/ServeboltApiError.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Servebolt\\Optimizer\\Dependencies\\GuzzleHttp\\Exception\\RequestException' not found in wp-content/plugins/servebolt-optimizer/src/Dependencies/GuzzleHttp/Exception/TooManyRedirectsException.php:5

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/options.php?page=servebolt-fpc
    • > Network (severe)
    wp-admin/admin.php?page=servebolt-html-cache - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
8 plugin tags: cache, wp-cli, performance, optimization, html cache...

servebolt-optimizer/servebolt-optimizer.php 92% from 13 tests

The main file in "Servebolt Optimizer" v. 3.5.25 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 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
There were no executable files found in this plugin39,597 lines of code in 557 files:
LanguageFilesBlank linesComment linesLines of code
PHP5286,34818,20835,880
JavaScript141916592,389
JSON100888
CSS56525351
Markdown424054
XML10021
YAML12011
SVG3003

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity9.90
▷ Minimum class complexity1.00
▷ Maximum class complexity114.00
Average method complexity2.55
▷ Minimum method complexity1.00
▷ Maximum method complexity37.00
Code structure
Namespaces108
Interfaces34
Traits22
Classes393
▷ Abstract classes133.31%
▷ Concrete classes38096.69%
▷ Final classes359.21%
Methods2,472
▷ Static methods53921.80%
▷ Public methods1,73670.23%
▷ Protected methods1094.41%
▷ Private methods62725.36%
Functions413
▷ Named functions15537.53%
▷ Anonymous functions25862.47%
Constants93
▷ Global constants2425.81%
▷ Class constants6974.19%
▷ Public constants5884.06%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
4 PNG files occupy 0.02MB with 0.00MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/dist/images/cancel.png1.21KB1.23KB0.00%
assets/dist/images/servebolt-logo.png14.35KB7.51KB▼ 47.63%
assets/dist/images/servebolt-icon.png3.34KB2.34KB▼ 30.10%
assets/dist/images/checked.png0.75KB0.76KB0.00%