77% stacks-access

Code Review | Web3devs Stacks Access Plugin

WordPress plugin Web3devs Stacks Access Plugin scored77%from 54 tests.

About plugin

  • Plugin page: stacks-access
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9.2-6.0
  • WordPress version: 6.3.1
  • First release: Jun 20, 2022
  • Latest release: Jul 14, 2022
  • Number of updates: 5
  • Update frequency: every 5.4 days
  • Top authors: web3devs (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /211 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.07MB] [CPU: ▼8.06ms] Passed 4 tests

A check of server-side resources used by Web3devs Stacks Access Plugin
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0337.64 ▼5.63
Dashboard /wp-admin3.34 ▲0.0447.68 ▼5.39
Posts /wp-admin/edit.php3.39 ▲0.0450.33 ▲4.92
Add New Post /wp-admin/post-new.php5.48 ▼0.4173.36 ▼21.62
Media Library /wp-admin/upload.php3.26 ▲0.0433.69 ▲0.42
Settings /wp-admin/admin.php?page=web3devs-stacks-access-settings3.2734.11
Stacks Access /wp-admin/admin.php?page=web3devs-stacks-access3.2630.32

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 36 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Web3devs Stacks Access Plugin
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,940 ▲19421.80 ▲7.43463.77 ▲461.9945.28 ▲0.82
Dashboard /wp-admin2,233 ▲454.89 ▼1.02106.31 ▼11.3240.17 ▼7.85
Posts /wp-admin/edit.php2,116 ▲302.01 ▲0.0139.26 ▲3.5834.10 ▼1.33
Add New Post /wp-admin/post-new.php6,222 ▲4,70824.49 ▲7.03936.67 ▲287.9258.83 ▲2.28
Media Library /wp-admin/upload.php1,415 ▲334.12 ▼0.0795.48 ▼1.3043.27 ▼0.13
Settings /wp-admin/admin.php?page=web3devs-stacks-access-settings1,0052.0629.0829.37
Stacks Access /wp-admin/admin.php?page=web3devs-stacks-access8012.0523.9025.80

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 50% 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 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 fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/stacks-access/admin/partials/web3devs-stacks-access-admin-display.php
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_errors() in wp-content/plugins/stacks-access/admin/partials/web3devs-stacks-access-admin-settings-display.php:68
    • > PHP Notice
      Undefined variable: coins in wp-content/plugins/stacks-access/admin/partials/web3devs-stacks-access-admin-settings-display.php on line 35

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Screenshots: Add images for these screenshots: #1 (Plugin on plugins list), #2 (Token configuration screen (Settings)), #3 (Connect wallet triggered on a page with restricted access), #4 (Selecting account), #5 (Signing message)
  • Requires php: Version not formatted correctly
You can look at the official readme.txt

stacks-access/web3devs-stacks-access.php 85% from 13 tests

"Web3devs Stacks Access Plugin" version 1.0.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("stacks-access.php" instead of "web3devs-stacks-access.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin760 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PHP13193570697
JavaScript6414952
CSS2188
Markdown1002
HTML1001

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity9.71
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.20
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods51
▷ Static methods23.92%
▷ Public methods3976.47%
▷ Protected methods00.00%
▷ Private methods1223.53%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
6 PNG files occupy 0.72MB with 0.47MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-3.png106.29KB37.75KB▼ 64.48%
public/js/stack-sign/dist/logo.png19.98KB6.95KB▼ 65.23%
assets/screenshot-4.png106.19KB36.95KB▼ 65.20%
assets/screenshot-5.png137.23KB48.47KB▼ 64.68%
assets/screenshot-1.png203.29KB71.71KB▼ 64.73%