78% wp-speedup

Code Review | WP SpeedUp

WordPress plugin WP SpeedUp scored78%from 54 tests.

About plugin

  • Plugin page: wp-speedup
  • Plugin version: 1.4.7
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.2
  • WordPress version: 6.3.1
  • First release: Jul 16, 2015
  • Latest release: May 2, 2023
  • Number of updates: 43
  • Update frequency: every 66.3 days
  • Top authors: fahadmahmood (83.72%)Jess Parker (18.6%)

Code review

54 tests

User reviews

9 reviews

Install metrics

500+ active /30,256 total downloads

Benchmarks

Plugin footprint 83% 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: ▲0.23MB] [CPU: ▼0.36ms] Passed 4 tests

Server-side resources used by WP SpeedUp
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.71 ▲0.2547.70 ▲8.31
Dashboard /wp-admin3.58 ▲0.2453.05 ▼9.79
Posts /wp-admin/edit.php3.64 ▲0.2953.72 ▲3.43
Add New Post /wp-admin/post-new.php6.11 ▲0.2296.14 ▲0.81
Media Library /wp-admin/upload.php3.43 ▲0.2040.30 ▲4.11
WP SpeedUp (1.4.7) /wp-admin/options-general.php?page=wp_su3.5240.91

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 23 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

WP SpeedUp: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,967 ▲23214.69 ▲0.401.96 ▲0.4543.69 ▲0.67
Dashboard /wp-admin2,346 ▲1656.19 ▲0.48104.77 ▲10.8337.90 ▼6.54
Posts /wp-admin/edit.php2,280 ▲1803.40 ▲1.3847.05 ▲1.5131.38 ▼5.73
Add New Post /wp-admin/post-new.php1,693 ▲15722.14 ▼0.65614.16 ▼9.3127.48 ▼26.72
Media Library /wp-admin/upload.php1,414 ▲114.15 ▼0.0178.60 ▼27.6740.77 ▼6.64
WP SpeedUp (1.4.7) /wp-admin/options-general.php?page=wp_su1,6133.1238.3862.21

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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
  • 13 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wp_su
    • > Notice in wp-content/plugins/wp-speedup/inc/wpsu_css_settings.php+95
    Undefined property: WPSUCSS::$nspace

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
Almost there! Just fix the following items
  • 3× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/wp-speedup/inc/wpsu_settings.php
    • > /wp-content/plugins/wp-speedup/inc/functions.php
    • > /wp-content/plugins/wp-speedup/index.php

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

Often overlooked, readme.txt is one of the most important files in your plugin
8 plugin tags: css speedup, css compress, js speedup, js compress, wp speedup...

wp-speedup/index.php 92% from 13 tests

Analyzing the main PHP file in "WP SpeedUp" version 1.4.7
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wp-speedup.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin2,662 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP88723331,453
PO File3273273764
CSS2393308
JavaScript2478137

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity93.00
▷ Minimum class complexity93.00
▷ Maximum class complexity93.00
Average method complexity3.42
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods38
▷ Static methods00.00%
▷ Public methods38100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions27
▷ Named functions27100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants125.00%
▷ Class constants375.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/mechanic_with_board.png30.96KB13.51KB▼ 56.36%