68% web3-coin-gate

Code Review | Web3 Coin Gate

WordPress plugin Web3 Coin Gate scored68%from 54 tests.

About plugin

  • Plugin page: web3-coin-gate
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.7+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8.3-6.1
  • WordPress version: 6.3.1
  • First release: Jan 6, 2023
  • Latest release: Jan 11, 2023
  • Number of updates: 5
  • Update frequency: every 1.0 days
  • Top authors: abraxasdao (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /267 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.55MB] [CPU: ▼3.65ms] Passed 4 tests

This is a short check of server-side resources used by Web3 Coin Gate
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.08 ▲0.6244.31 ▲0.46
Dashboard /wp-admin3.91 ▲0.6047.73 ▼4.11
Posts /wp-admin/edit.php3.96 ▲0.6050.68 ▲1.49
Add New Post /wp-admin/post-new.php6.44 ▲0.5586.08 ▼12.42
Media Library /wp-admin/upload.php3.67 ▲0.4438.76 ▲5.88
Freemius Debug [v.2.5.3] /wp-admin/admin.php?page=freemius4.0435.65

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 238 new files
Database: no new tables, 10 new options
New WordPress options
can_compress_scripts
fs_debug_mode
fs_active_plugins
fs_accounts
db_upgraded
fs_gdpr
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Web3 Coin Gate
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,157 ▲42237.23 ▲22.68117.87 ▲115.8233.50 ▼11.92
Dashboard /wp-admin2,240 ▲525.84 ▲0.9496.62 ▼12.7741.32 ▼7.27
Posts /wp-admin/edit.php2,123 ▲312.01 ▼0.0541.93 ▼3.0838.86 ▲4.43
Add New Post /wp-admin/post-new.php1,545 ▲2223.02 ▼0.24566.30 ▼68.6436.32 ▼14.05
Media Library /wp-admin/upload.php1,416 ▲254.28 ▲0.0299.67 ▲1.9345.79 ▲2.89
Freemius Debug [v.2.5.3] /wp-admin/admin.php?page=freemius1,0811.7325.2927.01

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/web3-coin-gate/freemius/includes/class-freemius.php+8772
    Undefined property: stdClass::$plugins
  • The uninstall procedure has failed, leaving 10 options in the database
    • fs_active_plugins
    • widget_recent-comments
    • fs_accounts
    • fs_gdpr
    • db_upgraded
    • fs_debug_mode
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 50% 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 0% 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
Please take a closer look at the following
  • 5× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/web3-coin-gate/includes/class-web3-coin-gate-shortcode.php
    • > /wp-content/plugins/web3-coin-gate/includes/class-web3-coin-gate-frontend.php
    • > /wp-content/plugins/web3-coin-gate/includes/class-web3-coin-gate-admin.php
    • > /wp-content/plugins/web3-coin-gate/includes/class-web3-coin-gate-settings.php
    • > /wp-content/plugins/web3-coin-gate/web3-coin-gate.php
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/web3-coin-gate/includes/rest-api/rest.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_rest_route() in wp-content/plugins/web3-coin-gate/includes/rest-api/routes/class-web3-coin-gate-verification.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
4 plugin tags: nft, web3, verification, blockchain

web3-coin-gate/web3-coin-gate.php 92% from 13 tests

The entry point to "Web3 Coin Gate" version 1.0.0 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Domain Path: The domain path folder does not exist ("/languages")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected140,389 lines of code in 181 files:
LanguageFilesBlank linesComment linesLines of code
JSON110084,091
PHP1398,19817,59533,942
JavaScript123,6342,53322,274
Sass216358
CSS150815
XML2009

PHP code 50% from 2 tests

This plugin's cyclomatic complexity and code structure detailed below
These items need your attention
  • Please reduce cyclomatic complexity of classes to less than 1000 (currently 3,089)
Cyclomatic complexity
Average complexity per logical line of code0.63
Average class complexity78.84
▷ Minimum class complexity1.00
▷ Maximum class complexity3,089.00
Average method complexity4.54
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes58
▷ Abstract classes23.45%
▷ Concrete classes5696.55%
▷ Final classes11.79%
Methods1,308
▷ Static methods21116.13%
▷ Public methods92470.64%
▷ Protected methods171.30%
▷ Private methods36728.06%
Functions106
▷ Named functions9791.51%
▷ Anonymous functions98.49%
Constants148
▷ Global constants10168.24%
▷ Class constants4731.76%
▷ Public constants47100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
5 PNG files occupy 0.11MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/banner-1544x500.png63.42KB24.33KB▼ 61.64%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
assets/icon-256x256.png20.54KB9.90KB▼ 51.81%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
freemius/assets/img/web3-coin-gate.png9.16KB5.26KB▼ 42.58%