90% disk-space-usage

Code Review | Disk Space Usage

WordPress plugin Disk Space Usage scored90%from 54 tests.

About plugin

  • Plugin page: disk-space-usage
  • Plugin version: 1.7
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.4.1
  • WordPress version: 6.3.1
  • First release: Sep 9, 2020
  • Latest release: Nov 9, 2023
  • Number of updates: 11
  • Update frequency: every 105.1 days
  • Top authors: sidngr (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active /2,280 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

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

Analyzing server-side resources used by Disk Space Usage
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.26 ▲1.55
Dashboard /wp-admin3.31 ▲0.0147.02 ▲3.36
Posts /wp-admin/edit.php3.36 ▲0.0145.36 ▼11.73
Add New Post /wp-admin/post-new.php5.89 ▲0.0177.87 ▼11.58
Media Library /wp-admin/upload.php3.24 ▲0.0133.94 ▲1.51

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Disk Space Usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,845 ▲8314.27 ▲0.101.72 ▲0.2236.07 ▼3.63
Dashboard /wp-admin2,250 ▲705.55 ▼0.0483.87 ▼5.4443.98 ▲1.74
Posts /wp-admin/edit.php2,100 ▼01.94 ▼0.0841.18 ▲0.7335.18 ▼2.00
Add New Post /wp-admin/post-new.php1,528 ▼723.16 ▼2.00683.92 ▲60.3355.96 ▼9.79
Media Library /wp-admin/upload.php1,400 ▲34.19 ▼0.0795.39 ▼3.4143.55 ▲3.28

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
2 plugin tags: disk, space

disk-space-usage/init.php 92% from 13 tests

"Disk Space Usage" version 1.7'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:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("disk-space-usage.php" instead of "init.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin63 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1173363

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
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%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin