79% wp-server-stats

Code Review | WP Server Health Stats

WordPress plugin WP Server Health Stats scored79%from 54 tests.

About plugin

  • Plugin page: wp-server-stats
  • Plugin version: 1.7.3
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2
  • WordPress version: 6.3.1
  • First release: Oct 27, 2015
  • Latest release: Feb 28, 2023
  • Number of updates: 146
  • Update frequency: every 19.6 days
  • Top authors: isaumya (100%)

Code review

54 tests

User reviews

101 reviews

Install metrics

10,000+ active /248,555 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▲5.06ms] Passed 4 tests

An overview of server-side resources used by WP Server Health Stats
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0043.15 ▲5.13
Dashboard /wp-admin3.36 ▲0.06163.32 ▲119.32
Posts /wp-admin/edit.php3.46 ▲0.1158.82 ▲12.32
Add New Post /wp-admin/post-new.php5.95 ▲0.0793.52 ▲1.24
Media Library /wp-admin/upload.php3.27 ▲0.0536.58 ▲1.55
Database Information /wp-admin/admin.php?page=wpss_sql_info3.8648.62
PHP Information /wp-admin/admin.php?page=wpss_php_info3.5143.04
General Settings /wp-admin/admin.php?page=wp_server_stats3.3132.15

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 12 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
wpss_db_advanced_info
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Server Health Stats
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,222 ▲47613.73 ▼0.652.00 ▲0.4343.67 ▲1.42
Dashboard /wp-admin2,924 ▲7335.64 ▲0.78117.89 ▲15.7862.04 ▲19.86
Posts /wp-admin/edit.php2,450 ▲3612.42 ▲0.4151.40 ▲11.6738.14 ▲0.45
Add New Post /wp-admin/post-new.php1,873 ▲35217.67 ▼5.81699.75 ▲89.5740.20 ▼8.75
Media Library /wp-admin/upload.php1,737 ▲3524.65 ▲0.42108.33 ▼4.7344.44 ▼4.04
Database Information /wp-admin/admin.php?page=wpss_sql_info4,4682.1548.9056.03
PHP Information /wp-admin/admin.php?page=wpss_php_info6,6162.6851.1181.41
General Settings /wp-admin/admin.php?page=wp_server_stats1,9474.52133.0038.47

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
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
Please fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/wp-server-stats/wp-server-stats.php

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There are user-side issues you should fix
    • > GET request to /wp-admin/admin.php?page=wp_server_stats
    • > Network (severe)
    https://api.razorpay.com/v1/payment_buttons/pl_FXG3hGY91IY5Rk/button_preferences - Failed to load resource: the server responded with a status of 400 (Bad Request)

Optimizations

Plugin configuration Passed 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
9 plugin tags: admin, widget, health, dashboard, server...

wp-server-stats/wp-server-stats.php Passed 13 tests

"WP Server Health Stats" version 1.7.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
83 characters long description:
Show up the memory limit and current memory usage in the dashboard and admin footer

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin3,113 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript46619021,386
PHP31841201,321
CSS48515406

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity122.00
▷ Minimum class complexity122.00
▷ Maximum class complexity122.00
Average method complexity3.16
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods56
▷ Static methods11.79%
▷ Public methods56100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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