10% plugin-reinstaller

Code Review | Plugin Reinstaller

WordPress plugin Plugin Reinstaller scored10%from 54 tests.

About plugin

  • Plugin page: plugin-reinstaller
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-3.6
  • WordPress version: 6.3.1
  • First release: Jul 4, 2013
  • Latest release: Jul 10, 2013
  • Number of updates: 6
  • Update frequency: every 1.2 days
  • Top authors: Hiroaki Miyashita (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,590 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The following installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/plugin-reinstaller/plugin-reinstaller.php+28
    Methods with the same name as their class will not be constructors in a future version of PHP; plugin_reinstaller has a deprecated constructor

Server metrics [RAM: ▼1.93MB] [CPU: ▼58.37ms] Passed 4 tests

Server-side resources used by Plugin Reinstaller
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.06 ▼1.404.52 ▼43.26
Dashboard /wp-admin2.08 ▼1.235.59 ▼46.04
Posts /wp-admin/edit.php2.08 ▼1.285.87 ▼45.91
Add New Post /wp-admin/post-new.php2.08 ▼3.815.97 ▼98.28
Media Library /wp-admin/upload.php2.08 ▼1.155.78 ▼31.40

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

Plugin Reinstaller: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.25 ▼1.061.64 ▼0.2445.76 ▲2.50
Dashboard /wp-admin2,206 ▲155.89 ▲0.9999.20 ▼6.2140.47 ▲1.00
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0734.66 ▼4.0938.58 ▲4.31
Add New Post /wp-admin/post-new.php1,534 ▼823.43 ▲5.18689.01 ▲62.9554.66 ▼5.20
Media Library /wp-admin/upload.php1,385 ▼64.21 ▲0.01113.07 ▲13.5647.09 ▲4.77

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/plugin-reinstaller/plugin-reinstaller.php+28
    Methods with the same name as their class will not be constructors in a future version of PHP; plugin_reinstaller has a deprecated constructor
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/plugin-reinstaller/plugin-reinstaller.php:31

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Screenshots: Please add an image for screenshot #1 (Select `Update` > `Bulk Actions`.)
You can take inspiration from this readme.txt

plugin-reinstaller/plugin-reinstaller.php Passed 13 tests

"Plugin Reinstaller" version 1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
46 characters long description:
This plugin enables the bulk plugin reinstall.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin45 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1212245

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity4.33
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 compressed PNG file occupies 0.05MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png48.31KB48.13KB0.38%