84% site-reset

Code Review | Reset Complete Site

WordPress plugin Reset Complete Site scored84%from 54 tests.

About plugin

  • Plugin page: site-reset
  • Plugin version: 1.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.7
  • WordPress version: 6.3.1
  • First release: Aug 7, 2017
  • Latest release: Apr 10, 2021
  • Number of updates: 18
  • Update frequency: every 74.6 days
  • Top authors: Mahesh901122 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,268 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

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

Analyzing server-side resources used by Reset Complete Site
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0041.13 ▼5.52
Dashboard /wp-admin3.39 ▲0.0048.18 ▼21.53
Posts /wp-admin/edit.php3.50 ▲0.1048.08 ▼3.54
Add New Post /wp-admin/post-new.php5.97 ▲0.04103.63 ▼10.33
Media Library /wp-admin/upload.php3.31 ▲0.0437.17 ▲0.25
Reset Complete Site /wp-admin/tools.php?page=site-reset3.3035.09

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Reset Complete Site
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,796 ▲3514.34 ▼0.012.04 ▼0.3459.08 ▲16.17
Dashboard /wp-admin2,202 ▲255.56 ▼0.0285.48 ▼5.2936.14 ▼8.08
Posts /wp-admin/edit.php2,107 ▲72.02 ▲0.0634.92 ▼2.7933.33 ▼2.69
Add New Post /wp-admin/post-new.php1,532 ▲423.02 ▼0.01615.28 ▼74.7947.79 ▼11.51
Media Library /wp-admin/upload.php1,404 ▲74.21 ▼0.02101.57 ▼9.0444.88 ▼4.24
Reset Complete Site /wp-admin/tools.php?page=site-reset9722.1825.8526.95

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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
The following issues need your attention
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/site-reset/includes/view-admin-page.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/site-reset/site-reset.php:20

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

readme.txt 94% from 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
Please fix the following attributes:
  • Screenshots: A description for screenshot #1 is missing in site-reset/assets to your readme.txt
You can take inspiration from this readme.txt

site-reset/site-reset.php 92% from 13 tests

The main PHP file in "Reset Complete Site" ver. 1.2.1 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Description: The description should be shorter than 140 characters (currently 160 characters long)

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
Good job! No executable or dangerous file extensions detected259 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP383129245
JavaScript15014

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity27.00
▷ Minimum class complexity27.00
▷ Maximum class complexity27.00
Average method complexity3.60
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods110.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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 images were found in this plugin