84% reinstall-themes

Code Review | Reinstall Themes

WordPress plugin Reinstall Themes scored84%from 54 tests.

About plugin

  • Plugin page: reinstall-themes
  • Plugin version: 0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2.0-5.2.3
  • WordPress version: 6.3.1
  • First release: Jun 24, 2016
  • Latest release: Oct 15, 2019
  • Number of updates: 5
  • Update frequency: every 242.2 days
  • Top authors: alex-ye (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

700+ active /10,257 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
This plugin's installer ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼9.17ms] Passed 4 tests

Server-side resources used by Reinstall Themes
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.74 ▲0.0041.75 ▼7.88
Dashboard /wp-admin3.57 ▼0.0651.43 ▼18.81
Posts /wp-admin/edit.php3.68 ▲0.0050.18 ▲0.69
Add New Post /wp-admin/post-new.php6.15 ▲0.0093.62 ▼10.67
Media Library /wp-admin/upload.php3.49 ▲0.0039.12 ▲1.38

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Reinstall Themes
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.75 ▲0.172.01 ▲0.0850.54 ▲8.56
Dashboard /wp-admin2,198 ▲215.66 ▲0.1089.68 ▼1.7137.54 ▼5.37
Posts /wp-admin/edit.php2,100 ▼02.02 ▲0.0141.54 ▲6.2537.13 ▲1.01
Add New Post /wp-admin/post-new.php1,531 ▼1423.35 ▲0.15657.91 ▼13.6452.54 ▼6.30
Media Library /wp-admin/upload.php1,400 ▲64.18 ▼0.0697.16 ▼6.1042.27 ▼1.97

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
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ReinstallThemes\\add_filter() in wp-content/plugins/reinstall-themes/main.php:17

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% 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
3 plugin tags: theme, themes, upload

reinstall-themes/main.php 92% from 13 tests

The main PHP script in "Reinstall Themes" version 0.2 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("reinstall-themes.php" instead of "main.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin12 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP142012

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code1.33
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
Namespaces1
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%
Functions1
▷ Named functions1100.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
No PNG images were found in this plugin