78% better-speed

Code Review | Why So Slow?

WordPress plugin Why So Slow? scored78%from 54 tests.

About plugin

  • Plugin page: better-speed
  • Plugin version: 2.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.0
  • WordPress version: 6.3.1
  • First release: Jun 29, 2019
  • Latest release: May 24, 2022
  • Number of updates: 14
  • Update frequency: every 75.7 days
  • Top authors: bettersecurity (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /2,337 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.19MB] [CPU: ▼1.77ms] Passed 4 tests

A check of server-side resources used by Why So Slow?
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1939.49 ▼5.84
Dashboard /wp-admin3.50 ▲0.1947.14 ▼2.66
Posts /wp-admin/edit.php3.61 ▲0.2648.23 ▼0.16
Add New Post /wp-admin/post-new.php6.08 ▲0.1995.69 ▲4.52
Media Library /wp-admin/upload.php3.42 ▲0.1934.52 ▲1.57
Why So Slow? /wp-admin/options-general.php?page=better-speed-settings3.3730.91

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 26 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Why So Slow?: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6914.48 ▲0.081.63 ▼0.4641.46 ▼11.24
Dashboard /wp-admin2,213 ▲224.85 ▼0.04100.84 ▼18.5839.44 ▼3.87
Posts /wp-admin/edit.php2,093 ▲71.99 ▼0.0236.98 ▲0.7933.73 ▲0.61
Add New Post /wp-admin/post-new.php1,545 ▲3118.17 ▲0.71607.32 ▼48.3052.77 ▼0.37
Media Library /wp-admin/upload.php1,395 ▲44.19 ▼0.0199.31 ▲3.7439.59 ▼3.37
Why So Slow? /wp-admin/options-general.php?page=better-speed-settings1,5162.0237.6061.40

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: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=better-speed-settings
    • > Notice in wp-content/plugins/better-speed/better-speed.php+526
    Undefined offset: 1

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/better-speed/better-speed.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
8 plugin tags: bloat, whysoslow, better, performance, security...

better-speed/better-speed.php 85% from 13 tests

"Why So Slow?" version 2.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Domain Path: The domain path points to a folder that does not exist ("/languages")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected895 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP38273841
SVG10040
JavaScript20210
CSS1264

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions74
▷ Named functions5067.57%
▷ Anonymous functions2432.43%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
17 PNG files occupy 0.11MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/ui-bg_glass_75_dadada_1x400.png0.26KB0.16KB▼ 38.93%
images/ui-bg_glass_55_fbf9ee_1x400.png0.33KB0.12KB▼ 62.09%
images/ui-icons_454545_256x240.png6.83KB4.17KB▼ 38.86%
images/ui-icons_888888_256x240.png6.83KB4.17KB▼ 38.92%
images/ui-bg_glass_95_fef1ec_1x400.png0.32KB0.15KB▼ 54.82%