73% web3-access

Code Review | Web3 Access

WordPress plugin Web3 Access scored73%from 54 tests.

About plugin

  • Plugin page: web3-access
  • Plugin version: 1.5.9
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.4.1
  • WordPress version: 6.3.1
  • First release: May 27, 2022
  • Latest release: Nov 30, 2023
  • Number of updates: 34
  • Update frequency: every 16.3 days
  • Top authors: RogueWebDesign (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active /5,289 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.85MB] [CPU: ▲10.68ms] Passed 4 tests

Analyzing server-side resources used by Web3 Access
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.24 ▲0.7748.54 ▲4.68
Dashboard /wp-admin4.18 ▲0.8857.36 ▲11.87
Posts /wp-admin/edit.php4.23 ▲0.8863.63 ▲13.92
Add New Post /wp-admin/post-new.php6.89 ▲1.00115.90 ▲18.75
Media Library /wp-admin/upload.php4.11 ▲0.8850.49 ▲12.25
All Product /wp-admin/edit.php?post_type=metapress_product4.1547.17
Access Settings /wp-admin/admin.php?page=metapress-access-settings4.1149.84
Networks /wp-admin/admin.php?page=metapress-networks4.1243.72
Subscriptions /wp-admin/admin.php?page=metapress-subscriptions4.0976.27
Add New /wp-admin/post-new.php?post_type=metapress_product4.1958.65
Payments /wp-admin/admin.php?page=metapress-payments4.0746.03
API Keys /wp-admin/admin.php?page=metapress-api-keys4.0743.16
Settings /wp-admin/admin.php?page=metapress-settings4.1248.28
Payment Tokens /wp-admin/admin.php?page=metapress-tokens4.1749.62
Wallet Addresses /wp-admin/admin.php?page=metapress-wallet-addresses4.0746.86

Server storage [IO: ▲2.73MB] [DB: ▲0.01MB] Passed 3 tests

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 95 new files
Database: 5 new tables, 19 new options
New tables
wp_metapress_access_tokens
wp_metapress_test_payments
wp_metapress_payments
wp_metapress_subscriptions
wp_metapress_test_subscriptions
New WordPress options
metapress_subscriptions_page
widget_theysaidso_widget
metapress_supported_test_networks
theysaidso_admin_options
can_compress_scripts
metapress_contract_addresses
metapress_update_request_key
metapress_token_ratios
widget_recent-comments
db_upgraded
...

Browser metrics Passed 4 tests

A check of browser resources used by Web3 Access
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,085 ▲33819.62 ▲5.41183.95 ▲182.2938.15 ▼6.19
Dashboard /wp-admin2,288 ▲1085.64 ▲0.0294.53 ▲1.6144.27 ▲2.39
Posts /wp-admin/edit.php2,193 ▲961.98 ▲0.0337.66 ▼0.0136.83 ▲2.63
Add New Post /wp-admin/post-new.php6,531 ▲5,00527.20 ▲3.67865.20 ▲172.6572.44 ▲13.69
Media Library /wp-admin/upload.php1,493 ▲934.32 ▲0.1297.53 ▲1.5543.46 ▲0.75
All Product /wp-admin/edit.php?post_type=metapress_product1,1571.9130.9332.54
Access Settings /wp-admin/admin.php?page=metapress-access-settings1,0922.0128.3735.48
Networks /wp-admin/admin.php?page=metapress-networks2,3032.0125.6035.31
Subscriptions /wp-admin/admin.php?page=metapress-subscriptions1,0002.1028.5139.35
Add New /wp-admin/post-new.php?post_type=metapress_product1,9243.6378.1439.07
Payments /wp-admin/admin.php?page=metapress-payments1,1751.9334.4042.61
API Keys /wp-admin/admin.php?page=metapress-api-keys9822.0024.9331.33
Settings /wp-admin/admin.php?page=metapress-settings1,2962.0025.4842.20
Payment Tokens /wp-admin/admin.php?page=metapress-tokens1,1293.0441.9170.56
Wallet Addresses /wp-admin/admin.php?page=metapress-wallet-addresses1,0642.0024.3735.23

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • The plugin did not uninstall successfully, leaving 5 tables in the database
    • wp_metapress_payments
    • wp_metapress_subscriptions
    • wp_metapress_test_payments
    • wp_metapress_access_tokens
    • wp_metapress_test_subscriptions
  • This plugin did not uninstall successfully, leaving 19 options in the database
    • metapress_transactions_page
    • metapress_update_request_key
    • theysaidso_admin_options
    • widget_recent-comments
    • metapress_token_ratios_updated_timestamp
    • metapress_contract_addresses
    • metapress_pages_created
    • db_upgraded
    • wp_metapress_plugin_version
    • metapress_api_request_match
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 36× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/web3-access/admin/metapress-admin-header.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/web3-access/convert/ratios.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/web3-access/admin/metapress-admin-header.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/web3-access/admin/metapress-admin-header.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/web3-access/admin/metapress-admin-header.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/web3-access/includes/scripts.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/web3-access/custom/product/create-type.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/web3-access/updates/automatic-updates.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/web3-access/custom/product/create-type.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function update_option() in wp-content/plugins/web3-access/updates/contract-update.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
10 plugin tags: restrict content, web 3, cryptocurrency, erc-20, crypto...

web3-access/web3-access.php 77% from 13 tests

This is the main PHP file of "Web3 Access" version 1.5.9, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 391 characters long)
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist
  • 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 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
Success! There were no dangerous files found in this plugin30,321 lines of code in 83 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript223,2484,58720,852
PHP44658595,799
CSS9254532,253
JSON5001,250
HTML390167

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity30.86
▷ Minimum class complexity1.00
▷ Maximum class complexity139.00
Average method complexity4.62
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes21
▷ Abstract classes00.00%
▷ Concrete classes21100.00%
▷ Final classes00.00%
Methods173
▷ Static methods00.00%
▷ Public methods14483.24%
▷ Protected methods74.05%
▷ Private methods2212.72%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
11 compressed PNG files occupy 0.05MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/ethereum.png3.72KB3.75KB0.00%
images/coinbase.png2.07KB2.13KB0.00%
images/avax.png3.55KB3.71KB0.00%
images/ethereumwallet.png1.81KB1.85KB0.00%
images/metapress-logo-icon.png15.68KB16.00KB0.00%