84% wordpress-reset

Code Review | WordPress Reset

WordPress plugin WordPress Reset scored84%from 54 tests.

About plugin

  • Plugin page: wordpress-reset
  • Plugin version: 1.4.2
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-5.9
  • WordPress version: 6.3.1
  • First release: Mar 17, 2009
  • Latest release: Feb 25, 2022
  • Number of updates: 29
  • Update frequency: every 163.3 days
  • Top authors: sivel (68.97%)aristath (34.48%)

Code review

54 tests

User reviews

68 reviews

Install metrics

10,000+ active /1,446,611 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

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

Analyzing server-side resources used by WordPress Reset
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0537.71 ▼3.28
Dashboard /wp-admin3.36 ▲0.0646.59 ▼4.49
Posts /wp-admin/edit.php3.41 ▲0.0648.92 ▼1.29
Add New Post /wp-admin/post-new.php5.94 ▲0.0697.31 ▲7.06
Media Library /wp-admin/upload.php3.28 ▲0.0633.78 ▼2.87
Reset /wp-admin/tools.php?page=wordpress-reset3.2529.95

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by WordPress Reset
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲7213.58 ▼0.781.78 ▼0.1642.84 ▼9.10
Dashboard /wp-admin2,213 ▲224.86 ▼0.04108.72 ▲4.4642.68 ▲3.24
Posts /wp-admin/edit.php2,096 ▲72.06 ▲0.0139.51 ▲0.1534.59 ▼0.65
Add New Post /wp-admin/post-new.php1,539 ▲1923.37 ▲0.37670.25 ▼45.0561.74 ▼6.39
Media Library /wp-admin/upload.php1,395 ▲44.21 ▼0.0095.43 ▼7.8841.08 ▼3.28
Reset /wp-admin/tools.php?page=wordpress-reset8152.0623.6129.54

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
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/wordpress-reset/wordpress-reset.php:305

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 Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
4 plugin tags: wordpress, wordpress-reset, reset, admin

wordpress-reset/wordpress-reset.php Passed 13 tests

The main file in "WordPress Reset" v. 1.4.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
140 characters long description:
Resets the WordPress database back to it's defaults. Deletes all customizations and content. Does not modify files only resets the database.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected204 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13271204

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.45
Average class complexity39.00
▷ Minimum class complexity39.00
▷ Maximum class complexity39.00
Average method complexity4.80
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.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

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin