89% wpmu-database-reset

Code Review | WPMU Database Reset

WordPress plugin WPMU Database Reset scored89%from 54 tests.

About plugin

  • Plugin page: wpmu-database-reset
  • Plugin version: 0.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.5.2
  • WordPress version: 6.3.1
  • First release: Feb 26, 2016
  • Latest release: Jul 7, 2016
  • Number of updates: 26
  • Update frequency: every 5.1 days
  • Top authors: shazdeh (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /4,297 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼2.98ms] Passed 4 tests

Server-side resources used by WPMU Database Reset
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0242.43 ▲0.30
Dashboard /wp-admin3.33 ▼0.0150.92 ▼17.85
Posts /wp-admin/edit.php3.39 ▲0.0353.40 ▲2.45
Add New Post /wp-admin/post-new.php5.92 ▲0.0399.63 ▲4.64
Media Library /wp-admin/upload.php3.26 ▲0.0339.60 ▲3.18
Database Reset /wp-admin/tools.php?page=wpmu-database-reset3.2233.25

Server storage [IO: ▲0.01MB] [DB: ▲0.00MB] 67% from 3 tests

Filesystem and database footprint
Just a few items left to fix
  • Illegal file modification detected: 1 file (4.00KB) outside of "wp-content/plugins/wpmu-database-reset/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for WPMU Database Reset
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲5813.23 ▼1.121.86 ▲0.1343.37 ▲3.14
Dashboard /wp-admin2,225 ▲254.87 ▼0.98107.66 ▲1.0141.65 ▼2.81
Posts /wp-admin/edit.php2,101 ▼21.98 ▼0.0740.22 ▼2.7936.65 ▼1.93
Add New Post /wp-admin/post-new.php1,548 ▲1723.31 ▲0.21680.79 ▼33.1653.20 ▼1.52
Media Library /wp-admin/upload.php1,407 ▲104.26 ▲0.0497.26 ▼3.4646.03 ▼0.71
Database Reset /wp-admin/tools.php?page=wpmu-database-reset8152.0126.4724.75

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
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
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

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

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

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: default, developer, database, reset, restore

wpmu-database-reset/wpmu-database-reset.php 92% from 13 tests

The principal PHP file in "WPMU Database Reset" v. 0.2.2 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist

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
Everything looks great! No dangerous files found in this plugin129 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP12330129

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity14.00
▷ Minimum class complexity14.00
▷ Maximum class complexity14.00
Average method complexity3.17
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected