77% rainbowkit-login-web3-integration-for-sign-in-with-ethereum

Code Review | RainbowKit Login (Web3 Integration for Sign-In With Ethereum)

WordPress plugin RainbowKit Login (Web3 Integration for Sign-In With Ethereum) scored77%from 54 tests.

About plugin

  • Plugin page: rainbowkit-login-...
  • Plugin version: 0.4.4
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9-6.4.1
  • WordPress version: 6.3.1
  • First release: May 10, 2022
  • Latest release: Nov 26, 2023
  • Number of updates: 29
  • Update frequency: every 19.5 days
  • Top authors: davisshaver (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,707 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.49MB] [CPU: ▼3.95ms] Passed 4 tests

Analyzing server-side resources used by RainbowKit Login (Web3 Integration for Sign-In With Ethereum)
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.98 ▲0.5240.85 ▼4.70
Dashboard /wp-admin3.80 ▲0.4649.54 ▼14.75
Posts /wp-admin/edit.php3.85 ▲0.4950.59 ▲2.94
Add New Post /wp-admin/post-new.php6.39 ▲0.5093.64 ▲0.70
Media Library /wp-admin/upload.php3.72 ▲0.4937.38 ▲6.95

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 518 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
db_upgraded
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for RainbowKit Login (Web3 Integration for Sign-In With Ethereum)
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,762 ▼019.10 ▲4.341.61 ▼0.1039.75 ▼2.32
Dashboard /wp-admin2,211 ▲375.58 ▼0.1290.07 ▼5.2740.18 ▼5.06
Posts /wp-admin/edit.php2,116 ▲162.03 ▲0.0639.56 ▲1.2135.91 ▼0.68
Add New Post /wp-admin/post-new.php6,226 ▲4,70024.72 ▲1.311,004.34 ▲340.1235.05 ▼24.20
Media Library /wp-admin/upload.php1,416 ▲164.27 ▲0.01107.12 ▲9.0341.79 ▲0.47

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
The following issues need your attention
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/rainbowkit-login-web3-integration-for-sign-in-with-ethereum/vendor/web3p/web3.php/docker/php/composer-setup.php
  • 227× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Test\\TestCase' not found in wp-content/plugins/rainbowkit-login-web3-integration-for-sign-in-with-ethereum/vendor/web3p/web3.php/test/unit/NetTest.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Web3\\Methods\\EthMethod' not found in wp-content/plugins/rainbowkit-login-web3-integration-for-sign-in-with-ethereum/vendor/web3p/web3.php/src/Methods/Eth/GetUncleCountByBlockNumber.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'phpseclib\\Crypt\\Base' not found in wp-content/plugins/rainbowkit-login-web3-integration-for-sign-in-with-ethereum/vendor/phpseclib/phpseclib/phpseclib/Crypt/Blowfish.php:129
    • > PHP Fatal error
      Uncaught Error: Class 'Web3\\Methods\\EthMethod' not found in wp-content/plugins/rainbowkit-login-web3-integration-for-sign-in-with-ethereum/vendor/web3p/web3.php/src/Methods/Eth/GetBlockByNumber.php:22
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Promise\\PromiseInterface' not found in wp-content/plugins/rainbowkit-login-web3-integration-for-sign-in-with-ethereum/vendor/guzzlehttp/promises/src/Promise.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Web3\\Methods\\EthMethod' not found in wp-content/plugins/rainbowkit-login-web3-integration-for-sign-in-with-ethereum/vendor/web3p/web3.php/src/Methods/Eth/GetTransactionByBlockHashAndIndex.php:21
    • > PHP Fatal error
      require(): Failed opening required 'wp-content/plugins/rainbowkit-login-web3-integration-for-sign-in-with-ethereum/vendor/simplito/elliptic-php/benchmarks/../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/rainbowkit-login-web3-integration-for-sign-in-with-ethereum/vendor/simplito/elliptic-php/benchmarks/EllipticBench.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'Test\\TestCase' not found in wp-content/plugins/rainbowkit-login-web3-integration-for-sign-in-with-ethereum/vendor/web3p/web3.php/test/unit/HttpProviderTest.php:11
    • > PHP Warning
      require(../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/rainbowkit-login-web3-integration-for-sign-in-with-ethereum/vendor/web3p/web3.php/examples/exampleBase.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'phpseclib\\Crypt\\Rijndael' not found in wp-content/plugins/rainbowkit-login-web3-integration-for-sign-in-with-ethereum/vendor/phpseclib/phpseclib/phpseclib/Crypt/AES.php:59

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention: You can take inspiration from this readme.txt

rainbowkit-login-web3-integration-for-sign-in-with-ethereum/wp-rainbow.php 85% from 13 tests

The main PHP file in "RainbowKit Login (Web3 Integration for Sign-In With Ethereum)" ver. 0.4.4 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("rainbowkit-login-web3-integration-for-sign-in-with-ethereum.php" instead of "wp-rainbow.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis 97% from 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
Good job! No executable or dangerous file extensions detected62,033 lines of code in 485 files:
LanguageFilesBlank linesComment linesLines of code
PHP3708,87225,46951,183
Markdown251,57104,444
CSS225244,331
JSON17001,763
YAML7250130
XML36069
JavaScript560056
Solidity29032
Bourne Shell15010
make13010
Dockerfile1405

PHP code 50% from 2 tests

An overview of cyclomatic complexity and code structure
Please fix the following
  • Method cyclomatic complexity should be reduced to less than 100 (currently 109)
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity20.88
▷ Minimum class complexity1.00
▷ Maximum class complexity634.00
Average method complexity3.97
▷ Minimum method complexity1.00
▷ Maximum method complexity109.00
Code structure
Namespaces48
Interfaces33
Traits3
Classes300
▷ Abstract classes31.00%
▷ Concrete classes29799.00%
▷ Final classes3712.46%
Methods2,311
▷ Static methods29112.59%
▷ Public methods2,15293.12%
▷ Protected methods160.69%
▷ Private methods1436.19%
Functions384
▷ Named functions12031.25%
▷ Anonymous functions26468.75%
Constants276
▷ Global constants3613.04%
▷ Class constants24086.96%
▷ Public constants22392.92%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin