89% web3-authentication

Code Review | Web3 - Crypto wallet Login & NFT token gating

WordPress plugin Web3 - Crypto wallet Login & NFT token gating scored89%from 54 tests.

About plugin

  • Plugin page: web3-authentication
  • Plugin version: 3.1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0.2-6.3
  • WordPress version: 6.3.1
  • First release: Apr 5, 2022
  • Latest release: Sep 1, 2023
  • Number of updates: 36
  • Update frequency: every 14.3 days
  • Top authors: n1t1ngupta0301 (66.67%)shubhangigulve (33.33%)cyberlord92 (5.56%)

Code review

54 tests

User reviews

21 reviews

Install metrics

200+ active /7,427 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

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

Server-side resources used by Web3 - Crypto wallet Login & NFT token gating
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0045.03 ▲2.75
Dashboard /wp-admin3.31 ▼0.0450.12 ▼15.78
Posts /wp-admin/edit.php3.36 ▲0.0050.80 ▼2.06
Add New Post /wp-admin/post-new.php5.89 ▲0.0089.33 ▼9.02
Media Library /wp-admin/upload.php3.23 ▲0.0038.61 ▲2.82

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 140 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Web3 - Crypto wallet Login & NFT token gating
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.23 ▼0.121.73 ▼0.0944.19 ▲0.61
Dashboard /wp-admin2,195 ▲185.59 ▲0.0495.71 ▲5.0939.76 ▼0.98
Posts /wp-admin/edit.php2,100 ▼31.98 ▼0.0640.24 ▲1.2142.67 ▲3.17
Add New Post /wp-admin/post-new.php1,526 ▼823.17 ▲4.79640.03 ▼12.7557.08 ▼9.46
Media Library /wp-admin/upload.php1,403 ▲34.18 ▼0.0596.26 ▼11.3348.12 ▲1.66

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

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

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Congratulations! This plugin passed the SRP test

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)
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% 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
These attributes need your attention:
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
Please take inspiration from this readme.txt

web3-authentication/miniorange-web3-login-settings.php 85% from 13 tests

The main file in "Web3 - Crypto wallet Login & NFT token gating" v. 3.1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("web3-authentication.php" instead of "miniorange-web3-login-settings.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 142 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin8,847 lines of code in 99 files:
LanguageFilesBlank linesComment linesLines of code
PHP711,6611,7968,731
JavaScript141315647
TypeScript20032
SVG60031
CSS6066

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity22.70
▷ Minimum class complexity1.00
▷ Maximum class complexity87.00
Average method complexity2.90
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces23
Interfaces0
Traits0
Classes44
▷ Abstract classes24.55%
▷ Concrete classes4295.45%
▷ Final classes12.38%
Methods489
▷ Static methods479.61%
▷ Public methods46194.27%
▷ Protected methods30.61%
▷ Private methods255.11%
Functions20
▷ Named functions1260.00%
▷ Anonymous functions840.00%
Constants36
▷ Global constants513.89%
▷ Class constants3186.11%
▷ Public constants2580.65%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
16 PNG files occupy 0.45MB with 0.16MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
classes/common/Web3/resources/images/cryptowallet_images/metamask.png21.22KB10.80KB▼ 49.10%
resources/images/miniorange.png0.44KB0.35KB▼ 18.61%
classes/common/Web3/resources/images/woocommerce.png46.09KB21.00KB▼ 54.44%
classes/common/Web3/resources/images/paypal.png7.45KB7.20KB▼ 3.36%
classes/common/Web3/resources/images/buddyboss.png67.57KB29.31KB▼ 56.62%