78% advanced-wp-reset

Code Review | Advanced WordPress Reset - Debug, Recover & Reset WP

WordPress plugin Advanced WordPress Reset - Debug, Recover & Reset WP scored78%from 54 tests.

About plugin

  • Plugin page: advanced-wp-reset
  • Plugin version: 2.0.5
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.4
  • WordPress version: 6.3.1
  • First release: Mar 20, 2016
  • Latest release: Nov 30, 2023
  • Number of updates: 63
  • Update frequency: every 44.6 days
  • Top authors: symptote (100%)

Code review

54 tests

User reviews

1187 reviews

Install metrics

30,000+ active /1,121,828 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.71MB] [CPU: ▲1.18ms] 75% from 4 tests

Analyzing server-side resources used by Advanced WordPress Reset - Debug, Recover & Reset WP
Please take the time to fix the following items
  • CPU: Total CPU usage must kept under 500.00ms (currently 535.86ms on /wp-admin/tools.php?page=awr_full_reset)
PageMemory (MB)CPU Time (ms)
Home /4.18 ▲0.7140.72 ▲1.35
Dashboard /wp-admin4.01 ▲0.7148.60 ▼0.26
Posts /wp-admin/edit.php4.13 ▲0.7753.54 ▲7.08
Add New Post /wp-admin/post-new.php6.60 ▲0.7185.00 ▼1.20
Media Library /wp-admin/upload.php3.94 ▲0.7137.59 ▲4.81
Advanced WP Reset /wp-admin/tools.php?page=awr_full_reset4.12535.86

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 104 new files
Database: no new tables, 11 new options
New WordPress options
widget_recent-comments
awr_stp_rtg
db_upgraded
widget_recent-posts
can_compress_scripts
awr_show_notifications
awr_inst_time
awr_stp_top_notice
theysaidso_admin_options
widget_theysaidso_widget
...

Browser metrics Passed 4 tests

Advanced WordPress Reset - Debug, Recover & Reset WP: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,850 ▲8814.67 ▲0.431.52 ▼0.1636.86 ▼9.57
Dashboard /wp-admin2,240 ▲635.56 ▼0.0094.52 ▼8.7598.54 ▲48.68
Posts /wp-admin/edit.php2,164 ▲642.08 ▲0.1239.20 ▲1.9435.84 ▼2.68
Add New Post /wp-admin/post-new.php1,581 ▲5523.24 ▼0.37683.68 ▲88.4756.00 ▲8.55
Media Library /wp-admin/upload.php1,454 ▲514.16 ▲0.0296.17 ▼0.7567.97 ▲26.93
Advanced WP Reset /wp-admin/tools.php?page=awr_full_reset7,3302.8579.40124.57

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 11 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • awr_show_notifications
    • theysaidso_admin_options
    • awr_inst_time
    • awr_stp_news
    • widget_recent-comments
    • awr_stp_top_notice
    • awr_stp_rtg
    • can_compress_scripts
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however 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 take a closer look at the following
  • 3× PHP files output text when accessed directly:
    • > /wp-content/plugins/advanced-wp-reset/assets/templates/sidebar-template.php
    • > /wp-content/plugins/advanced-wp-reset/assets/templates/snapshots-template.php
    • > /wp-content/plugins/advanced-wp-reset/assets/templates/activation-template.php
  • 51× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Warning
      in_array() expects parameter 2 to be array, null given in wp-content/plugins/advanced-wp-reset/assets/templates/snapshots-template.php on line 170
    • > PHP Warning
      Use of undefined constant AWR_IS_PRO_VERSION - assumed 'AWR_IS_PRO_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/advanced-wp-reset/assets/templates/snapshots-template.php on line 192
    • > PHP Warning
      Use of undefined constant AWR_YOUTUBE_CHANNEL - assumed 'AWR_YOUTUBE_CHANNEL' (this will throw an Error in a future version of PHP) in wp-content/plugins/advanced-wp-reset/assets/templates/sidebar-template.php on line 64
    • > PHP Warning
      Use of undefined constant AWR_PLUGIN_SUPPORT - assumed 'AWR_PLUGIN_SUPPORT' (this will throw an Error in a future version of PHP) in wp-content/plugins/advanced-wp-reset/assets/templates/sidebar-template.php on line 37
    • > PHP Warning
      Use of undefined constant AWR_PLUGIN_FAQ - assumed 'AWR_PLUGIN_FAQ' (this will throw an Error in a future version of PHP) in wp-content/plugins/advanced-wp-reset/assets/templates/sidebar-template.php on line 69
    • > PHP Fatal error
      Uncaught Error: Class 'awr\\services_pro\\LicenseService' not found in wp-content/plugins/advanced-wp-reset/assets/templates/home.inc.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'awr\\endpoints\\AbstractController' not found in wp-content/plugins/advanced-wp-reset/includes/endpoints/tools-reset-controller.class.php:8
    • > PHP Warning
      in_array() expects parameter 2 to be array, null given in wp-content/plugins/advanced-wp-reset/assets/templates/snapshots-template.php on line 23
    • > PHP Notice
      Undefined variable: hidden_videos in wp-content/plugins/advanced-wp-reset/assets/templates/tools-template.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function print_deals_with_files_db() in wp-content/plugins/advanced-wp-reset/assets/templates/switcher-template.php:105

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 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
5 plugin tags: clean, database, reset database, restore, reset

advanced-wp-reset/advanced-wp-reset.php 85% from 13 tests

"Advanced WordPress Reset - Debug, Recover & Reset WP" version 2.0.5's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 143 characters long)
  • Domain Path: The domain path points to a folder that does not exist ("/languages/")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin8,414 lines of code in 91 files:
LanguageFilesBlank linesComment linesLines of code
PHP462,1641,2666,593
JavaScript10296171834
CSS5142644
SVG30131343

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity18.29
▷ Minimum class complexity1.00
▷ Maximum class complexity83.00
Average method complexity3.08
▷ Minimum method complexity1.00
▷ Maximum method complexity44.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes35
▷ Abstract classes411.43%
▷ Concrete classes3188.57%
▷ Final classes00.00%
Methods295
▷ Static methods206.78%
▷ Public methods24984.41%
▷ Protected methods51.69%
▷ Private methods4113.90%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants55
▷ Global constants5498.18%
▷ Class constants11.82%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/img/banner-man-img.png47.99KB15.82KB▼ 67.05%