68% dao-login

Code Review | DAO Login

WordPress plugin DAO Login scored68%from 54 tests.

About plugin

  • Plugin page: dao-login
  • Plugin version: 0.2.1
  • PHP compatiblity: 7.0.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3.1-5.8.2
  • WordPress version: 6.3.1
  • First release: Nov 25, 2021
  • Latest release: Dec 28, 2021
  • Number of updates: 3
  • Update frequency: every 11.3 days
  • Top authors: artpi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /883 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼1.23MB] [CPU: ▼39.11ms] Passed 4 tests

A check of server-side resources used by DAO Login
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.74 ▼0.7213.63 ▼21.00
Dashboard /wp-admin2.79 ▼0.5215.94 ▼31.34
Posts /wp-admin/edit.php2.79 ▼0.5716.61 ▼24.17
Add New Post /wp-admin/post-new.php2.79 ▼3.1016.71 ▼79.91
Media Library /wp-admin/upload.php2.79 ▼0.4415.48 ▼13.85
DAO Login /wp-admin/options-general.php?page=dao-login2.7915.67

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 81 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for DAO Login
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,826 ▲8014.37 ▼0.291.91 ▲0.4533.55 ▼9.65
Dashboard /wp-admin2,207 ▲165.80 ▼0.0993.67 ▼15.9938.09 ▼7.37
Posts /wp-admin/edit.php2,093 ▲72.06 ▲0.0039.52 ▲2.3736.41 ▲5.23
Add New Post /wp-admin/post-new.php6,243 ▲4,71421.53 ▲3.29828.44 ▲173.2851.20 ▼7.18
Media Library /wp-admin/upload.php1,386 ▼24.26 ▲0.0699.10 ▲3.5441.34 ▼2.31
DAO Login /wp-admin/options-general.php?page=dao-login7872.0324.5628.17

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
  • Uninstall procedure had uncaught errors
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, function 'Artpi\WPDAOmembers_only_caps' not found or invalid function name
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=dao-login
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, function 'Artpi\WPDAOmembers_only_caps' not found or invalid function name
    • > GET request to /wp-admin/options-general.php?page=dao-login
    • > Notice in wp-content/plugins/dao-login/dao-permissions.php+157
    Trying to access array offset on value of type bool

SRP 50% 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
  • 33× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Exception: Extension bcmath not loaded in wp-content/plugins/dao-login/vendor/simplito/bigint-wrapper-php/lib/BigInteger.php:236
    • > PHP Warning
      require(wp-content/plugins/dao-login/vendor/simplito/elliptic-php/benchmarks/../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/dao-login/vendor/simplito/elliptic-php/benchmarks/EllipticBench.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'Elliptic\\Curve\\BaseCurve' not found in wp-content/plugins/dao-login/vendor/simplito/elliptic-php/lib/Curve/MontCurve.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Artpi\\WPDAO\\add_action() in wp-content/plugins/dao-login/members-only.php:14
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-content/plugins/dao-login/vendor/simplito/elliptic-php/tests/../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/dao-login/vendor/simplito/elliptic-php/tests/PointCodecTest.php on line 2
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-content/plugins/dao-login/vendor/simplito/elliptic-php/tests/../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/dao-login/vendor/simplito/elliptic-php/tests/ECDSATest.php on line 2
    • > PHP Fatal error
      Uncaught Exception: Cannot use BigInteger. Neither gmp nor bcmath module is loaded in wp-content/plugins/dao-login/vendor/simplito/bigint-wrapper-php/lib/BigInteger.php:14
    • > PHP Warning
      require_once(wp-content/plugins/dao-login/vendor/simplito/elliptic-php/tests/../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/dao-login/vendor/simplito/elliptic-php/tests/PointCodecTest.php on line 2
    • > PHP Fatal error
      require(): Failed opening required 'wp-content/plugins/dao-login/vendor/simplito/elliptic-php/benchmarks/../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/dao-login/vendor/simplito/elliptic-php/benchmarks/EllipticBench.php on line 3
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-content/plugins/dao-login/vendor/simplito/elliptic-php/tests/../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/dao-login/vendor/simplito/elliptic-php/tests/HmacDRBGTest.php on line 2

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
7 plugin tags: nft, dao, sso, login, web3...

dao-login/dao-login.php Passed 13 tests

The main PHP script in "DAO Login" version 0.2.1 is automatically included on every request by WordPress
91 characters long description:
Make your site web3-ready: Log in with Ethereum or create users based on governance tokens.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected11,537 lines of code in 71 files:
LanguageFilesBlank linesComment linesLines of code
PHP531,42272210,439
JSON900871
JavaScript19670
YAML313061
XML24050
Markdown210036
make13010

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity23.25
▷ Minimum class complexity1.00
▷ Maximum class complexity153.00
Average method complexity2.52
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces14
Interfaces0
Traits0
Classes40
▷ Abstract classes25.00%
▷ Concrete classes3895.00%
▷ Final classes25.26%
Methods559
▷ Static methods9516.99%
▷ Public methods52694.10%
▷ Protected methods30.54%
▷ Private methods305.37%
Functions79
▷ Named functions6075.95%
▷ Anonymous functions1924.05%
Constants14
▷ Global constants857.14%
▷ Class constants642.86%
▷ Public constants116.67%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin