78% tenweb-speed-optimizer

Code Review | 10Web Booster - Website speed optimization, Cache & Page Speed optimizer

WordPress plugin 10Web Booster - Website speed optimization, Cache & Page Speed optimizer scored78%from 54 tests.

About plugin

  • Plugin page: tenweb-speed-opti...
  • Plugin version: 2.24.18
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Jul 7, 2022
  • Latest release: Oct 27, 2023
  • Number of updates: 199
  • Update frequency: every 2.4 days
  • Top authors: 10web (90.95%)vanush10web (9.55%)

Code review

54 tests

User reviews

289 reviews

Install metrics

80,000+ active /861,422 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲3.36MB] [CPU: ▲21.50ms] Passed 4 tests

Analyzing server-side resources used by 10Web Booster - Website speed optimization, Cache & Page Speed optimizer
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /7.31 ▲3.8466.11 ▲27.84
Dashboard /wp-admin6.42 ▲3.0768.39 ▲7.22
Posts /wp-admin/edit.php7.31 ▲3.9474.75 ▲26.11
Add New Post /wp-admin/post-new.php9.22 ▲3.33118.88 ▲24.82
Media Library /wp-admin/upload.php6.42 ▲3.1968.29 ▲36.79
White Label /wp-admin/admin.php?page=two_white_label6.3859.27
Logs /wp-admin/admin.php?page=iowd_logs6.6763.70

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

Filesystem and database footprint
Just a few items left to fix
  • Illegal file modification detected: 2 files (7.66KB) outside of "wp-content/plugins/tenweb-speed-optimizer/" and "wp-content/uploads/"
    • (new file) wp-content/10web-page-cache-config/config.json
    • (modified) .htaccess
Filesystem: 467 new files
Database: no new tables, 16 new options
New WordPress options
two_trans_iowd_origin
widget_theysaidso_widget
theysaidso_admin_options
two_settings
two_critical_default_settings
two_delayed_js_execution_list_updated_fix_slashes
two_flow_score_log
two_delayed_js_execution_list_updated
widget_recent-comments
two_set_compress_html_default
...

Browser metrics Passed 4 tests

A check of browser resources used by 10Web Booster - Website speed optimization, Cache & Page Speed optimizer
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,532 ▲77113.71 ▼0.6512.71 ▲11.0046.00 ▲2.33
Dashboard /wp-admin2,567 ▲3874.90 ▼0.6790.84 ▼1.7789.77 ▲47.24
Posts /wp-admin/edit.php2,483 ▲3802.21 ▲0.1739.67 ▼0.4443.88 ▲11.63
Add New Post /wp-admin/post-new.php2,062 ▲53121.90 ▼1.52698.93 ▲61.2241.05 ▼15.47
Media Library /wp-admin/upload.php1,772 ▲3724.31 ▲0.1597.17 ▼2.5587.29 ▲40.69
White Label /wp-admin/admin.php?page=two_white_label1,2892.1626.6541.93
Logs /wp-admin/admin.php?page=iowd_logs1,3302.2528.9228.19

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin did not uninstall successfully, leaving 17 options in the database
    • two_set_compress_html_default
    • two_flow_score_log
    • db_upgraded
    • two_critical_default_settings
    • can_compress_scripts
    • two_trans_iowd_origin
    • two_set_dispatch_events
    • theysaidso_admin_options
    • tenweb_addons_state_hash
    • tenweb_plugins_state_hash
    • ...

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/tenweb-speed-optimizer/vendor/mrclay/jsmin-php/tests/bootstrap.php
    • > /wp-content/plugins/tenweb-speed-optimizer/vendor/pfaciana/tiny-html-minifier/tests/example.php
  • 74× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'DiDom\ode' not found in wp-content/plugins/tenweb-speed-optimizer/vendor/imangazaliev/didom/src/DiDom/DocumentFragment.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'TenWebQueue\\QueueOrchestrator' not found in wp-content/plugins/tenweb-speed-optimizer/vendor/10web-utils/10web-queue/src/TenWebQueue/Examples/example.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'Enqueue\\Fs\\Lock' not found in wp-content/plugins/tenweb-speed-optimizer/vendor/enqueue/fs/LegacyFilesystemLock.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Interop\\Queue\\Exception\\Exception' not found in wp-content/plugins/tenweb-speed-optimizer/vendor/queue-interop/queue-interop/src/Exception/DeliveryDelayNotSupportedException.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Interop\\Queue\\Exception\\Exception' not found in wp-content/plugins/tenweb-speed-optimizer/vendor/queue-interop/queue-interop/src/Exception/SubscriptionConsumerNotSupportedException.php:6
    • > PHP Fatal error
      Uncaught Error: Interface 'TenWebQueue\\Interfaces\\QueueConsumerInterface' not found in wp-content/plugins/tenweb-speed-optimizer/vendor/10web-utils/10web-queue/src/TenWebQueue/Abstracts/QueueConsumerAbstract.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'MatthiasMullie\\Minify\\Minify' not found in wp-content/plugins/tenweb-speed-optimizer/vendor/matthiasmullie/minify/src/JS.php:25
    • > PHP Fatal error
      Trait 'TenWebQueue\\Traits\\QueueRestart' not found in wp-content/plugins/tenweb-speed-optimizer/vendor/10web-utils/10web-queue/src/TenWebQueue/QueueContext.php on line 15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_style() in wp-content/plugins/tenweb-speed-optimizer/views/referral_program_page.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Interop\\Queue\\Exception\\Exception' not found in wp-content/plugins/tenweb-speed-optimizer/vendor/queue-interop/queue-interop/src/Exception/TemporaryQueueNotSupportedException.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

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
7 plugin tags: cache, critical css, web vitals, pagespeed, speed...

tenweb-speed-optimizer/tenweb_speed_optimizer.php 92% from 13 tests

This is the main PHP file of "10Web Booster - Website speed optimization, Cache & Page Speed optimizer" version 2.24.18, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("tenweb-speed-optimizer.php" instead of "tenweb_speed_optimizer.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin53,536 lines of code in 395 files:
LanguageFilesBlank linesComment linesLines of code
PHP2046,2147,02234,734
JSON22306,784
JavaScript666258224,980
CSS17341524,427
Markdown1781201,599
SVG5700622
Python24633204
XML47178
HTML312360
YAML29041
TypeScript1277

PHP code Passed 2 tests

This is a short overview 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.48
Average class complexity30.42
▷ Minimum class complexity1.00
▷ Maximum class complexity485.00
Average method complexity4.35
▷ Minimum method complexity1.00
▷ Maximum method complexity78.00
Code structure
Namespaces38
Interfaces19
Traits4
Classes136
▷ Abstract classes85.88%
▷ Concrete classes12894.12%
▷ Final classes43.12%
Methods1,445
▷ Static methods38626.71%
▷ Public methods1,17981.59%
▷ Protected methods1178.10%
▷ Private methods14910.31%
Functions103
▷ Named functions4947.57%
▷ Anonymous functions5452.43%
Constants220
▷ Global constants14967.73%
▷ Class constants7132.27%
▷ Public constants71100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
20 compressed PNG files occupy 0.27MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/offer_underline.png0.46KB0.33KB▼ 29.30%
assets/images/waving_hand.png0.91KB0.96KB0.00%
assets/css/DataTables-1.10.20/images/sort_asc_disabled.png0.14KB0.25KB0.00%
assets/css/DataTables-1.10.20/images/sort_asc.png0.16KB0.25KB0.00%
assets/css/DataTables-1.10.20/images/sort_desc.png0.15KB0.25KB0.00%