83% wp-speed-of-light

Code Review | WP Speed of Light

WordPress plugin WP Speed of Light scored83%from 54 tests.

About plugin

  • Plugin page: wp-speed-of-light
  • Plugin version: 3.3.4
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.4
  • WordPress version: 6.3.1
  • First release: Sep 23, 2016
  • Latest release: Nov 10, 2023
  • Number of updates: 205
  • Update frequency: every 12.7 days
  • Top authors: JoomUnited (100%)

Code review

54 tests

User reviews

85 reviews

Install metrics

9,000+ active /493,961 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲1.17MB] [CPU: ▲2.72ms] Passed 4 tests

An overview of server-side resources used by WP Speed of Light
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.96 ▲0.5037.75 ▼3.74
Dashboard /wp-admin4.70 ▲1.3951.37 ▲3.58
Posts /wp-admin/edit.php4.74 ▲1.3856.88 ▲10.16
Add New Post /wp-admin/post-new.php7.44 ▲1.55102.28 ▲0.88
Media Library /wp-admin/upload.php4.64 ▲1.4146.44 ▲11.46
Speed optimization /wp-admin/admin.php?page=wpsol_speed_optimization5.1551.12
Speed analysis /wp-admin/admin.php?page=wpsol_speed_analysis4.7742.26
Dashboard /wp-admin/admin.php?page=wpsol_dashboard4.5941.91
More SpeedUp /wp-admin/admin.php?page=wpsol_more_speedup4.5338.46

Server storage [IO: ▲5.14MB] [DB: ▲0.00MB] 67% from 3 tests

Filesystem and database footprint
It is recommended to fix the following issues
  • Illegal file modification found: 8 files (9.32KB) outside of "wp-content/plugins/wp-speed-of-light/" and "wp-content/uploads/"
    • (new file) wp-content/cache/wpsol-minification/css/index.html
    • (new file) wp-content/cache/wpsol-minification/js/index.html
    • (new file) wp-content/cache/wpsol-minification/.htaccess
    • (modified) wp-config.php
    • (new file) wp-content/wpsol-config/speed-of-light-config.php
    • (new file) wp-content/advanced-cache.php
    • (new file) wp-content/cache/wpsol-minification/index.html
    • (modified) .htaccess
Filesystem: 162 new files
Database: no new tables, 14 new options
New WordPress options
widget_recent-posts
db_upgraded
wpsol_jufeedback_version
wpsol_database_queries_analysis
can_compress_scripts
theysaidso_admin_options
wpsol_db_version
wpsol_jureview_installation_time
widget_recent-comments
wpsol_optimization_settings
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Speed of Light
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,972 ▲21013.63 ▼0.718.66 ▲7.0137.46 ▼6.24
Dashboard /wp-admin2,257 ▲775.96 ▲0.3297.87 ▼1.5683.63 ▲40.48
Posts /wp-admin/edit.php2,185 ▲852.36 ▲0.4038.28 ▼1.0436.57 ▲3.12
Add New Post /wp-admin/post-new.php1,595 ▲6023.13 ▲0.02778.52 ▲121.6736.17 ▼21.32
Media Library /wp-admin/upload.php1,471 ▲714.46 ▲0.1997.82 ▼4.7780.66 ▲38.33
Speed optimization /wp-admin/admin.php?page=wpsol_speed_optimization3,7904.99130.7048.76
Speed analysis /wp-admin/admin.php?page=wpsol_speed_analysis1,6113.1654.6367.84
Dashboard /wp-admin/admin.php?page=wpsol_dashboard1,4582.6038.6566.48
More SpeedUp /wp-admin/admin.php?page=wpsol_more_speedup1,0972.1629.5834.48

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 13 options
    • widget_recent-comments
    • wpsol_database_queries_analysis
    • can_compress_scripts
    • theysaidso_admin_options
    • wpsol_db_version
    • wpsol_jufeedback_version
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • wpsol_cdn_integration
    • ...

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
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 6× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/wp-speed-of-light/src/JUCheckRequirements.php
    • > /wp-content/plugins/wp-speed-of-light/wp-speed-of-light.php
    • > /wp-content/plugins/wp-speed-of-light/src/Cdn/Rewrite.php
    • > /wp-content/plugins/wp-speed-of-light/assets/file.php
    • > /wp-content/plugins/wp-speed-of-light/src/Rss.php
    • > /wp-content/plugins/wp-speed-of-light/src/Rest.php

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Tags: You are using too many tags: 22 tag instead of maximum 10
  • Screenshots: These screenshots lack descriptions #2, #3, #4, #5, #6, #7 in wp-speed-of-light/assets to your readme.txt
You can look at the official readme.txt

wp-speed-of-light/wp-speed-of-light.php Passed 13 tests

"WP Speed of Light" version 3.3.4's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
87 characters long description:
WP Speed of Light is used to speed up your WP site. It will approach the speed of light

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected32,334 lines of code in 113 files:
LanguageFilesBlank linesComment linesLines of code
PHP631,9334,64114,408
JavaScript302,0821,0668,825
CSS161,2664167,638
SVG4001,463

PHP code 50% from 2 tests

A short 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 139)
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity46.97
▷ Minimum class complexity1.00
▷ Maximum class complexity164.00
Average method complexity5.93
▷ Minimum method complexity1.00
▷ Maximum method complexity139.00
Code structure
Namespaces8
Interfaces0
Traits0
Classes37
▷ Abstract classes12.70%
▷ Concrete classes3697.30%
▷ Final classes00.00%
Methods343
▷ Static methods11633.82%
▷ Public methods26376.68%
▷ Protected methods4513.12%
▷ Private methods3510.20%
Functions25
▷ Named functions1456.00%
▷ Anonymous functions1144.00%
Constants42
▷ Global constants2354.76%
▷ Class constants1945.24%
▷ Public constants19100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
15 compressed PNG files occupy 0.42MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/default-dashboard.png14.22KB6.62KB▼ 53.47%
assets/images/ui-icons_cc0000_256x240.png3.62KB4.11KB0.00%
assets/images/ui-icons_333333_256x240.png4.27KB4.11KB▼ 3.78%
assets/images/ui-icons_999999_256x240.png3.68KB4.18KB0.00%
assets/images/ui-icons_21759b_256x240.png2.97KB3.25KB0.00%