78% reset

Code Review | Reset

WordPress plugin Reset scored78%from 54 tests.

About plugin

  • Plugin page: reset
  • Plugin version: 1.3
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-6.3.2
  • WordPress version: 6.3.1
  • First release: Jun 12, 2023
  • Latest release: Oct 25, 2023
  • Number of updates: 21
  • Update frequency: every 6.6 days
  • Top authors: shubhamgrover7256 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active /1,492 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

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

Server-side resources used by Reset
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0333.88 ▼6.01
Dashboard /wp-admin3.34 ▲0.0348.20 ▼2.21
Posts /wp-admin/edit.php3.39 ▲0.0344.61 ▼2.77
Add New Post /wp-admin/post-new.php5.92 ▲0.0380.01 ▼11.86
Media Library /wp-admin/upload.php3.26 ▲0.0335.75 ▼0.58

Server storage [IO: ▲0.02MB] [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: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Reset
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,830 ▲6913.90 ▼0.651.62 ▼0.3041.94 ▼1.43
Dashboard /wp-admin2,236 ▲565.55 ▼0.1184.89 ▼17.4444.10 ▲1.26
Posts /wp-admin/edit.php2,118 ▲152.01 ▲0.0236.54 ▼0.5631.91 ▼4.69
Add New Post /wp-admin/post-new.php1,541 ▲1323.09 ▼0.02651.65 ▼34.2760.46 ▲8.49
Media Library /wp-admin/upload.php1,418 ▲184.15 ▲0.0192.83 ▼8.9042.32 ▼1.13

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
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/reset/delete_comments.php
    • > /wp-content/plugins/reset/reset_theme.php
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/reset/data_reset.php:15
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/reset/table_data.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_plugins() in wp-content/plugins/reset/plugin_reset.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were 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
4 plugin tags: reset, wordpress-reset, reset wordpress database, reset database

reset/data_reset.php 92% from 13 tests

The main PHP script in "Reset" version 1.3 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("reset.php" instead of "data_reset.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected384 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP56157314
CSS16070

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.51
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%
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 images were found in this plugin