84% force-reinstall

Code Review | Force Reinstall

WordPress plugin Force Reinstall scored84%from 54 tests.

About plugin

  • Plugin page: force-reinstall
  • Plugin version: 1.1.8
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.2
  • WordPress version: 6.3.1
  • First release: Apr 8, 2021
  • Latest release: Jun 11, 2023
  • Number of updates: 28
  • Update frequency: every 28.4 days
  • Top authors: tygalive (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

2,000+ active /15,551 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
Installer ran successfully

Server metrics [RAM: ▲0.27MB] [CPU: ▼0.90ms] Passed 4 tests

Server-side resources used by Force Reinstall
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.68 ▲0.2143.47 ▲0.78
Dashboard /wp-admin3.64 ▲0.3453.98 ▲0.23
Posts /wp-admin/edit.php3.69 ▲0.3356.83 ▲0.82
Add New Post /wp-admin/post-new.php6.17 ▲0.2889.59 ▼5.44
Media Library /wp-admin/upload.php3.50 ▲0.2740.58 ▲6.67

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 259 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Force Reinstall: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,884 ▲12314.39 ▲0.021.62 ▲0.0341.19 ▼2.00
Dashboard /wp-admin2,294 ▲1175.62 ▲0.0495.15 ▼0.2938.35 ▼4.50
Posts /wp-admin/edit.php2,199 ▲992.15 ▲0.1442.98 ▲5.5537.06 ▼1.56
Add New Post /wp-admin/post-new.php1,576 ▲5023.33 ▲0.29670.61 ▼16.5255.80 ▼6.59
Media Library /wp-admin/upload.php1,493 ▲934.25 ▲0.0698.62 ▼16.3043.02 ▼5.85

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • 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 | 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 fix the following
  • 106× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Rich4rdMuvirimi\\ForceReinstall\\Vendor\\Br33f\\Ga4\\MeasurementProtocol\\Dto\\Parameter\\AbstractParameter' not found in wp-content/plugins/force-reinstall/vendor/force-reinstall/psr-4/Br33f/Ga4/MeasurementProtocol/Dto/Parameter/ItemCollectionParameter.php:16
    • > PHP Fatal error
      Uncaught Error: Interface 'Rich4rdMuvirimi\\ForceReinstall\\Vendor\\GuzzleHttp\\Promise\\PromisorInterface' not found in wp-content/plugins/force-reinstall/vendor/force-reinstall/psr-4/GuzzleHttp/Pool.php:24
    • > PHP Fatal error
      Uncaught Error: Interface 'Rich4rdMuvirimi\\ForceReinstall\\Vendor\\GuzzleHttp\\Promise\\PromiseInterface' not found in wp-content/plugins/force-reinstall/vendor/force-reinstall/psr-4/GuzzleHttp/Promise/Promise.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Rich4rdMuvirimi\\ForceReinstall\\Controller\\BaseController' not found in wp-content/plugins/force-reinstall/src/Controller/Site.php:27
    • > PHP Fatal error
      Uncaught Error: Interface 'Rich4rdMuvirimi\\ForceReinstall\\Vendor\\Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/force-reinstall/vendor/force-reinstall/psr-4/GuzzleHttp/Psr7/InflateStream.php:20
    • > PHP Fatal error
      Uncaught Error: Interface 'Rich4rdMuvirimi\\ForceReinstall\\Vendor\\GuzzleHttp\\Promise\\PromiseInterface' not found in wp-content/plugins/force-reinstall/vendor/force-reinstall/psr-4/GuzzleHttp/Promise/RejectedPromise.php:15
    • > PHP Fatal error
      Uncaught Error: Interface 'Rich4rdMuvirimi\\ForceReinstall\\Vendor\\Br33f\\Ga4\\MeasurementProtocol\\Dto\\ExportableInterface' not found in wp-content/plugins/force-reinstall/vendor/force-reinstall/psr-4/Br33f/Ga4/MeasurementProtocol/Dto/Common/UserProperties.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'Rich4rdMuvirimi\\ForceReinstall\\Vendor\\Psr\\Http\\Message\\ResponseInterface' not found in wp-content/plugins/force-reinstall/vendor/force-reinstall/psr-4/GuzzleHttp/Psr7/Response.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'Rich4rdMuvirimi\\ForceReinstall\\Vendor\\Psr\\Http\\Message\\RequestFactoryInterface' not found in wp-content/plugins/force-reinstall/vendor/force-reinstall/psr-4/GuzzleHttp/Psr7/HttpFactory.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/force-reinstall/tests/src/ControllerLoaderTest.php:24

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 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
Please fix the following attributes:
  • Donate link: Invalid URI ("[Buy Me A Coffee](https://buymeacoffee.com/fpjyrXk)")
  • License uri: Invalid URI ("[GPL - 2.0](http://www.gnu.org/licenses/gpl-2.0.html)")
The official readme.txt is a good inspiration

force-reinstall/force-reinstall.php Passed 13 tests

The principal PHP file in "Force Reinstall" v. 1.1.8 is loaded by WordPress automatically on each request
59 characters long description:
Easily force a Plugin or Theme reinstall from WordPress.org

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
Success! There were no dangerous files found in this plugin14,894 lines of code in 246 files:
LanguageFilesBlank linesComment linesLines of code
PHP2223,0778,22213,147
JSON8001,368
Markdown8700145
SVG200134
JavaScript217662
XML27020
CSS25418

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity9.19
▷ Minimum class complexity1.00
▷ Maximum class complexity98.00
Average method complexity2.57
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces34
Interfaces36
Traits4
Classes160
▷ Abstract classes74.38%
▷ Concrete classes15395.62%
▷ Final classes5032.68%
Methods1,042
▷ Static methods18417.66%
▷ Public methods90987.24%
▷ Protected methods121.15%
▷ Private methods12111.61%
Functions121
▷ Named functions2823.14%
▷ Anonymous functions9376.86%
Constants106
▷ Global constants43.77%
▷ Class constants10296.23%
▷ Public constants9189.22%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin