84% wp-disk-free

Code Review | WP Disk Free

WordPress plugin WP Disk Free scored84%from 54 tests.

About plugin

  • Plugin page: wp-disk-free
  • Plugin version: 0.2.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.1
  • WordPress version: 6.3.1
  • First release: Nov 16, 2016
  • Latest release: Nov 5, 2022
  • Number of updates: 32
  • Update frequency: every 68.0 days
  • Top authors: davide.airaghi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active /2,451 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼9.46ms] Passed 4 tests

A check of server-side resources used by WP Disk Free
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0439.47 ▲0.61
Dashboard /wp-admin3.36 ▲0.0146.54 ▼13.87
Posts /wp-admin/edit.php3.41 ▲0.0542.42 ▼0.26
Add New Post /wp-admin/post-new.php5.94 ▲0.0479.51 ▼24.32
Media Library /wp-admin/upload.php3.28 ▲0.0539.85 ▲6.85
Disk Free /wp-admin/options-general.php?page=wp-disk-free-page3.2431.02

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, 9 new options
New WordPress options
wpdf_notification
db_upgraded
widget_recent-comments
widget_theysaidso_widget
wpdf_email
wpdf_quota
can_compress_scripts
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for WP Disk Free
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲7214.24 ▼0.172.16 ▲0.5645.38 ▲1.40
Dashboard /wp-admin2,202 ▲225.61 ▲0.0098.62 ▲10.4341.45 ▲6.24
Posts /wp-admin/edit.php2,104 ▲42.00 ▲0.0133.97 ▼7.4636.26 ▼1.51
Add New Post /wp-admin/post-new.php1,529 ▲123.53 ▲0.37706.55 ▲86.3657.04 ▲2.88
Media Library /wp-admin/upload.php1,404 ▲74.10 ▼0.11109.56 ▲11.8247.66 ▲5.72
Disk Free /wp-admin/options-general.php?page=wp-disk-free-page8102.0223.8728.67

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
Please fix the following items
  • Zombie WordPress options were found after uninstall: 9 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • wpdf_email
    • widget_recent-comments
    • wpdf_notification
    • db_upgraded
    • wpdf_quota
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Please fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/wp-disk-free/wp-disk-free.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
3 plugin tags: check quota, disk free, disk usage

wp-disk-free/wp-disk-free.php Passed 13 tests

Analyzing the main PHP file in "WP Disk Free" version 0.2.3
113 characters long description:
Plugin used to check how much free space is available on the disk/partition used to host a Wordpress installation

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
No dangerous file extensions were detected182 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP22014182

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity28.00
▷ Minimum class complexity28.00
▷ Maximum class complexity28.00
Average method complexity4.38
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
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
No PNG files were detected