83% page-speed

Code Review | Page Speed

WordPress plugin Page Speed scored 83% from 54 tests.

About plugin

  • Plugin page: page-speed
  • Plugin version: 1.3.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.7.1
  • WordPress version: 6.3.1
  • First release: Jun 13, 2014
  • Latest release: Apr 30, 2021
  • Number of updates: 76
  • Update frequency: every 33.1 days
  • Top authors: buboiasinine (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

700+ active / 65,896 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.06MB] [CPU: ▼9.69ms] Passed 4 tests

This is a short check of server-side resources used by Page Speed
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0638.01 ▼9.00
Dashboard /wp-admin3.37 ▲0.0645.65 ▲1.10
Posts /wp-admin/edit.php3.42 ▲0.0646.22 ▼0.42
Add New Post /wp-admin/post-new.php5.97 ▲0.0883.45 ▼25.12
Media Library /wp-admin/upload.php3.29 ▲0.0633.51 ▼4.21

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Page Speed
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,820 ▲7414.47 ▲0.101.71 ▼0.1238.99 ▲1.64
Dashboard /wp-admin2,226 ▲414.88 ▼0.01109.40 ▲3.0338.43 ▼2.19
Posts /wp-admin/edit.php2,109 ▲202.02 ▼0.0240.32 ▼1.5135.43 ▲0.32
Add New Post /wp-admin/post-new.php1,531 ▼217.83 ▼5.33595.28 ▼60.0245.97 ▼4.39
Media Library /wp-admin/upload.php1,411 ▲234.32 ▲0.0996.73 ▼5.2841.67 ▼3.04

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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 9× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/page-speed/lib/function/functions.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/page-speed/lib/function/free/render-blocking-resources-stylesheet.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/page-speed/lib/function/free/removed_unused_css.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/page-speed/lib/function/free/removed_unused_javascript.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/page-speed/lib/function/free/cache_policy.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/page-speed/lib/function/functions.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/page-speed/lib/function/free/render-blocking-resources-javascript.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/page-speed/lib/function/free/enable_text_compresion.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/page-speed/lib/function/settings.php:2

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)
There were no browser issues found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% 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:
  • License uri: Invalid url: ""
  • Tags: Please delete some tags, you are using 13 tag instead of maximum 10
  • Plugin Name: You should set the name of your plugin on the first line ( === page-speed === )
The official readme.txt might help

page-speed/pagespeed.php 92% from 13 tests

"Page Speed" version 1.3.8's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("page-speed.php" instead of "pagespeed.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin431 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP929548431

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.46
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%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin