10% w3speedster-wp

Code Review | W3SPEEDSTER

WordPress plugin W3SPEEDSTER scored10%from 54 tests.

About plugin

  • Plugin page: w3speedster-wp
  • Plugin version: 7.19
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Aug 9, 2023
  • Latest release: Aug 24, 2023
  • Number of updates: 13
  • Update frequency: every 44.3 days
  • Top authors: w3speedster (100%)

Code review

54 tests

User reviews

1 review

Install metrics

1,000+ active /3,169 total downloads

Benchmarks

Plugin footprint 57% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The following installer errors require your attention
  • This plugin did not install gracefully
    • > Warning in wp-content/plugins/w3speedster-wp/includes/class_init.php+1004
    scandir(wp-content/cache/w3-cache): failed to open dir: No such file or directory

Server metrics [RAM: ▲0.49MB] [CPU: ▼0.97ms] Passed 4 tests

An overview of server-side resources used by W3SPEEDSTER
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.44 ▲0.9752.12 ▲9.59
Dashboard /wp-admin3.83 ▲0.5362.21 ▲7.52
Posts /wp-admin/edit.php3.88 ▲0.5253.99 ▼7.11
Add New Post /wp-admin/post-new.php6.35 ▲0.4690.60 ▼4.99
Media Library /wp-admin/upload.php3.69 ▲0.4642.12 ▲0.68

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

Analyzing filesystem and database footprints of this plugin
These are issues you should consider
  • Illegal file modification detected: 3 files (0.10KB) outside of "wp-content/plugins/w3speedster-wp/" and "wp-content/uploads/"
    • (new file) wp-content/w3-webp/.htaccess
    • (new file) wp-content/critical-css/.htaccess
    • (new file) wp-content/cache/w3-cache/.empty
Filesystem: 30 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
w3_speedup_filesize
db_upgraded
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by W3SPEEDSTER
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,864 ▲7814.35 ▼0.022.13 ▲0.0544.96 ▲0.32
Dashboard /wp-admin2,239 ▲625.55 ▼0.0797.76 ▼0.5444.37 ▲1.60
Posts /wp-admin/edit.php2,144 ▲442.01 ▲0.0636.34 ▼2.5437.69 ▲2.78
Add New Post /wp-admin/post-new.php1,563 ▲3523.33 ▲0.11664.32 ▼13.2957.77 ▲5.69
Media Library /wp-admin/upload.php1,444 ▲444.23 ▲0.06102.58 ▼6.1244.44 ▼3.83

Uninstaller [IO: ▲0.03MB] [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: 7 options
    • theysaidso_admin_options
    • w3_speedup_filesize
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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 items
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'W3speedster\\w3speedster' not found in wp-content/plugins/w3speedster-wp/includes/class_minify_css.php:4
    • > PHP Warning
      Use of undefined constant W3SPEEDSTER_PLUGIN_DIR - assumed 'W3SPEEDSTER_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/w3speedster-wp/admin/admin.php on line 2
    • > PHP Warning
      require_once(W3SPEEDSTER_PLUGIN_DIRadmin/class_admin.php): failed to open stream: No such file or directory in wp-content/plugins/w3speedster-wp/admin/admin.php on line 2
    • > PHP Fatal error
      require_once(): Failed opening required 'W3SPEEDSTER_PLUGIN_DIRadmin/class_admin.php' (include_path='.:/usr/share/php') in wp-content/plugins/w3speedster-wp/admin/admin.php on line 2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Tags: You are using too many tags: 58 tag instead of maximum 10
  • Screenshots: No descriptions were found for these screenshots #1, #2, #3, #4 in w3speedster-wp/assets to your readme.txt
The official readme.txt might help

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

"W3SPEEDSTER" version 7.19's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("w3speedster-wp.php" instead of "w3speedster.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin6,140 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP94773565,020
CSS11212759
JavaScript250251
Markdown1340110

PHP code 50% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
It is recommended to fix the following
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 104)
Cyclomatic complexity
Average complexity per logical line of code0.57
Average class complexity106.20
▷ Minimum class complexity1.00
▷ Maximum class complexity311.00
Average method complexity7.83
▷ Minimum method complexity1.00
▷ Maximum method complexity104.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods154
▷ Static methods10.65%
▷ Public methods13990.26%
▷ Protected methods95.84%
▷ Private methods63.90%
Functions42
▷ Named functions42100.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants444.44%
▷ Class constants555.56%
▷ Public constants5100.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
13 PNG files occupy 0.10MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/blank-p.png0.91KB0.09KB▼ 89.64%
assets/images/import-export-icon.png37.39KB28.42KB▼ 23.98%
assets/images/js-flat-js-dashboard.png7.05KB3.40KB▼ 51.86%
assets/images/blank-3x4.png0.29KB0.09KB▼ 67.79%
assets/images/w3-logo.png19.45KB5.59KB▼ 71.23%