84% disable-site-delete

Code Review | Disable Site Delete

WordPress plugin Disable Site Delete scored84%from 54 tests.

About plugin

  • Plugin page: disable-site-delete
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.2.4
  • WordPress version: 6.3.1
  • First release: Jun 7, 2013
  • Latest release: Aug 12, 2015
  • Number of updates: 3
  • Update frequency: every 265.3 days
  • Top authors: sbrajesh (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /2,410 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼9.45ms] Passed 4 tests

Analyzing server-side resources used by Disable Site Delete
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0136.87 ▼10.54
Dashboard /wp-admin3.32 ▼0.0346.19 ▼15.73
Posts /wp-admin/edit.php3.37 ▲0.0150.61 ▲4.27
Add New Post /wp-admin/post-new.php5.90 ▲0.0190.88 ▼11.60
Media Library /wp-admin/upload.php3.25 ▲0.0135.54 ▲0.07

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Disable Site Delete
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.23 ▼1.381.82 ▲0.1439.63 ▲2.47
Dashboard /wp-admin2,206 ▲155.88 ▲0.86105.89 ▼0.1739.09 ▼3.30
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0238.64 ▼2.5533.57 ▼1.82
Add New Post /wp-admin/post-new.php1,523 ▲423.24 ▲0.06674.13 ▲5.0155.85 ▼2.92
Media Library /wp-admin/upload.php1,382 ▼34.15 ▼0.0694.07 ▼3.3540.38 ▼1.27

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

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 take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/disable-site-delete/disable-site-delete.php:25

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 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
3 plugin tags: multisite, delete, blog

disable-site-delete/disable-site-delete.php 92% from 13 tests

The main PHP file in "Disable Site Delete" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Description: The description should be shorter than 140 characters (currently 186 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin52 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1154835
PO File12217

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity1.67
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods116.67%
▷ Public methods583.33%
▷ Protected methods00.00%
▷ Private methods116.67%
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

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