72% sg-cachepress

Code Review | Speed Optimizer - The All-In-One WordPress Performance-Boosting Plugin

WordPress plugin Speed Optimizer - The All-In-One WordPress Performance-Boosting Plugin scored72%from 54 tests.

About plugin

  • Plugin page: sg-cachepress
  • Plugin version: 7.4.4
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.4
  • WordPress version: 6.3.1
  • First release: Nov 25, 2014
  • Latest release: Nov 22, 2023
  • Number of updates: 445
  • Update frequency: every 7.5 days
  • Top authors: sstoqnov (46.97%)Hristo Sg (26.29%)elenachavdarova (16.4%)stoyangeorgiev (5.84%)ignatggeorgiev (3.37%)

Code review

54 tests

User reviews

568 reviews

Install metrics

1,000,000+ active /67,103,751 total downloads

Benchmarks

Plugin footprint 82% 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: ▲2.29MB] [CPU: ▲19.56ms] Passed 4 tests

Analyzing server-side resources used by Speed Optimizer - The All-In-One WordPress Performance-Boosting Plugin
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /5.76 ▲2.2965.20 ▲21.52
Dashboard /wp-admin5.58 ▲2.2862.94 ▲10.62
Posts /wp-admin/edit.php5.70 ▲2.3466.81 ▲22.91
Add New Post /wp-admin/post-new.php8.35 ▲2.46119.29 ▲24.87
Media Library /wp-admin/upload.php5.51 ▲2.2757.18 ▲23.20
SG Plugins /wp-admin/options-general.php?page=siteground_settings5.4746.92
Dashboard /wp-admin/admin.php?page=sg-cachepress5.5150.98
Environment /wp-admin/admin.php?page=sgo_environment5.4950.22
Caching /wp-admin/admin.php?page=sgo_caching5.4955.24
Site Performance /wp-admin/admin.php?page=sgo_analysis5.4949.84
Frontend /wp-admin/admin.php?page=sgo_frontend5.4953.20
Media /wp-admin/admin.php?page=sgo_media5.4949.64

Server storage [IO: ▲7.31MB] [DB: ▲0.01MB] 67% from 3 tests

Analyzing filesystem and database footprints of this plugin
Just a few items left to fix
  • Illegal file modification found: 1 file (3.98KB) outside of "wp-content/plugins/sg-cachepress/" and "wp-content/uploads/"
    • (modified) .htaccess
Filesystem: 934 new files
Database: no new tables, 48 new options
New WordPress options
siteground_optimizer_optimize_css
siteground_optimizer_update_timestamp
siteground_optimizer_first_run
siteground_settings_optimizer_hello
siteground_optimizer_async_javascript_exclude
siteground_optimizer_version
siteground_optimizer_combine_css
siteground_optimizer_quality_webp
siteground_optimizer_whats_new
siteground_optimizer_excluded_lazy_load_media_types
...

Browser metrics Passed 4 tests

Speed Optimizer - The All-In-One WordPress Performance-Boosting Plugin: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,889 ▲12714.07 ▼0.641.92 ▲0.2242.82 ▼1.57
Dashboard /wp-admin2,245 ▲745.51 ▼0.1192.44 ▼12.2178.30 ▲28.62
Posts /wp-admin/edit.php2,167 ▲671.83 ▼0.1432.89 ▼7.6034.52 ▲0.17
Add New Post /wp-admin/post-new.php6,254 ▲4,72826.32 ▲3.18931.44 ▲317.1836.72 ▼16.08
Media Library /wp-admin/upload.php1,468 ▲714.11 ▼0.0899.04 ▼4.6681.47 ▲34.44
SG Plugins /wp-admin/options-general.php?page=siteground_settings8901.9823.8229.25
Dashboard /wp-admin/admin.php?page=sg-cachepress1,2956.99134.40152.42
Environment /wp-admin/admin.php?page=sgo_environment1,2286.97141.6892.25
Caching /wp-admin/admin.php?page=sgo_caching1,2237.04118.1179.89
Site Performance /wp-admin/admin.php?page=sgo_analysis1,1236.59101.6496.03
Frontend /wp-admin/admin.php?page=sgo_frontend1,1716.33110.6993.12
Media /wp-admin/admin.php?page=sgo_media1,2059.32154.2586.27

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 47 options
    • siteground_optimizer_whats_new
    • can_compress_scripts
    • widget_theysaidso_widget
    • siteground_optimizer_phpcompat_status
    • siteground_optimizer_heartbeat_post_interval
    • db_upgraded
    • sg_cachepress
    • siteground_settings_optimizer_hello
    • sgo_install_7_4_0
    • siteground_optimizer_checked_nginx
    • ...

Smoke tests 25% 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 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
Please fix the following
  • 6× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/sg-cachepress/templates/partials/campaing-1-step.php
    • > /wp-content/plugins/sg-cachepress/templates/campaigns/campaign-template.php
    • > /wp-content/plugins/sg-cachepress/templates/partials/campaing-0-step.php
    • > /wp-content/plugins/sg-cachepress/templates/partials/campaing-2-step.php
    • > /wp-content/plugins/sg-cachepress/templates/performance_reports/performance_reports.php
    • > /wp-content/plugins/sg-cachepress/templates/campaigns/new-campaign-template.php
  • 369× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/sg-cachepress/vendor/composer/installers/src/Composer/Installers/DecibelInstaller.php:4
    • > PHP Notice
      Undefined variable: args in wp-content/plugins/sg-cachepress/templates/partials/campaing-0-step.php on line 10
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/sg-cachepress/vendor/composer/installers/src/Composer/Installers/MODULEWorkInstaller.php:4
    • > PHP Notice
      Undefined variable: args in wp-content/plugins/sg-cachepress/templates/partials/campaing-0-step.php on line 104
    • > PHP Notice
      Undefined variable: args in wp-content/plugins/sg-cachepress/templates/partials/campaing-1-step.php on line 71
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/sg-cachepress/templates/partials/campaing-0-step.php on line 72
    • > PHP Fatal error
      Uncaught Error: Class 'SiteGround_Optimizer\\Install_Service\\Install' not found in wp-content/plugins/sg-cachepress/core/Install_Service/Install_5_2_5.php:6
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/sg-cachepress/templates/performance_reports/features.php on line 1
    • > PHP Notice
      Undefined variable: args in wp-content/plugins/sg-cachepress/templates/partials/campaing-1-step.php on line 197
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/sg-cachepress/vendor/composer/installers/src/Composer/Installers/AnnotateCmsInstaller.php:4

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following user-side errors
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=sgo_media
    • > Console-api (warning) in wp-content/plugins/sg-cachepress/assets/js/main.min.js?ver=7.4.4+1:334132
    %c\"checkIcon\" will be deprecated, please use \"icon\" instead" "color: red; font-size: small

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
9 plugin tags: speed, caching, supercacher, nginx, free...

sg-cachepress/sg-cachepress.php 92% from 13 tests

The entry point to "Speed Optimizer - The All-In-One WordPress Performance-Boosting Plugin" version 7.4.4 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Domain Path: The domain path folder does not exist ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin21,904 lines of code in 901 files:
LanguageFilesBlank linesComment linesLines of code
PHP2764,26210,70318,208
SVG583001,235
JSON1400952
CSS28017633
PO File115085301
Markdown51170253
JavaScript41201163
Sass125090
YAML24036
XML32033

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity8.86
▷ Minimum class complexity1.00
▷ Maximum class complexity114.00
Average method complexity3.12
▷ Minimum method complexity1.00
▷ Maximum method complexity53.00
Code structure
Namespaces48
Interfaces2
Traits3
Classes240
▷ Abstract classes114.58%
▷ Concrete classes22995.42%
▷ Final classes00.00%
Methods928
▷ Static methods11111.96%
▷ Public methods78484.48%
▷ Protected methods10611.42%
▷ Private methods384.09%
Functions41
▷ Named functions49.76%
▷ Anonymous functions3790.24%
Constants25
▷ Global constants416.00%
▷ Class constants2184.00%
▷ Public constants21100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin