72% token-of-trust

Code Review | Token of Trust: AI Identity Verification, Age Verification, and KYC

WordPress plugin Token of Trust: AI Identity Verification, Age Verification, and KYC scored72%from 54 tests.

About plugin

  • Plugin page: token-of-trust
  • Plugin version: 1.7.1
  • PHP compatiblity: 7.2.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.2.0
  • WordPress version: 6.3.1
  • First release: Jun 22, 2017
  • Latest release: Nov 15, 2023
  • Number of updates: 167
  • Update frequency: every 14.0 days
  • Top authors: tokenoftrust (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

100+ active /20,453 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.15MB] [CPU: ▲2.48ms] Passed 4 tests

Analyzing server-side resources used by Token of Trust: AI Identity Verification, Age Verification, and KYC
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1041.23 ▲0.61
Dashboard /wp-admin3.53 ▲0.1860.08 ▼2.80
Posts /wp-admin/edit.php3.58 ▲0.2360.88 ▲12.96
Add New Post /wp-admin/post-new.php6.03 ▲0.1494.58 ▼0.86
Media Library /wp-admin/upload.php3.41 ▲0.1953.18 ▲23.33
License & API /wp-admin/admin.php?page=totsettings_license3.4550.92

Server storage [IO: ▲1.13MB] [DB: ▲0.07MB] Passed 3 tests

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 186 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
tot_options
can_compress_scripts
db_upgraded
theysaidso_admin_options
tot_logs

Browser metrics Passed 4 tests

Token of Trust: AI Identity Verification, Age Verification, and KYC: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,964 ▲21713.83 ▼0.307.94 ▲6.1339.24 ▼4.13
Dashboard /wp-admin2,299 ▲1245.89 ▲0.1793.58 ▼14.9673.78 ▲31.77
Posts /wp-admin/edit.php2,202 ▲1022.42 ▲0.3338.85 ▼0.7834.93 ▲0.79
Add New Post /wp-admin/post-new.php1,573 ▲4723.32 ▲0.28664.90 ▼25.87170.86 ▲119.13
Media Library /wp-admin/upload.php1,492 ▲924.57 ▲0.28102.27 ▲4.4874.45 ▲34.46
License & API /wp-admin/admin.php?page=totsettings_license1,1021.9529.5336.74

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • tot_logs
    • db_upgraded
    • widget_theysaidso_widget
    • tot_options
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 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
Almost there! Just fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/token-of-trust/admin/settings-page/view-quickstart-modal.php
  • 54× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/token-of-trust/users/new-user-tot-connection.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/token-of-trust/upgrades/detection.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/token-of-trust/admin/settings-page/view-webhooks.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/token-of-trust/shared/shortcode-tot-reputation-status.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function TOT\\add_filter() in wp-content/plugins/token-of-trust/examples/filter--wc-process-order-set-quarantine.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/token-of-trust/admin/notices.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/token-of-trust/integrations/ultimate-member/um_account_page.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/token-of-trust/shared/flash-notice-queue.php:53
    • > PHP Fatal error
      Uncaught Error: Class 'TOT\\API_Connection' not found in wp-content/plugins/token-of-trust/shared/class-api-request.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function TOT\\add_filter() in wp-content/plugins/token-of-trust/examples/filter--wc-is_verification_required_for_order.php:13

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following user-side errors
    • > GET request to /wp-admin/admin.php?page=totsettings_license
    • > Javascript (severe) in unknown
    /wp-content/plugins/token-of-trust/admin/settings-page/common/tot-quickstart.js?ver=6.3.1 87:21 Uncaught TypeError: Cannot read properties of null (reading 'getElementsByClassName')

Optimizations

Plugin configuration 93% from 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
5 plugin tags: kyc, verify age, woocommerce, identity verification, fraud prevention

token-of-trust/token-of-trust.php 85% from 13 tests

This is the main PHP file of "Token of Trust: AI Identity Verification, Age Verification, and KYC" version 1.7.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Description: Please don't use more than 140 characters for the plugin description (currently 350 characters long)
  • Requires at least: The required version number must match the one declared in readme.txt ("3.0.1" instead of "3.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin21,785 lines of code in 180 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript672,58377010,051
PHP962,0051,3189,605
CSS8192371,350
PO File2196231620
JSON10074
SVG40052
Markdown211033

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity23.35
▷ Minimum class complexity1.00
▷ Maximum class complexity243.00
Average method complexity3.70
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes31
▷ Abstract classes00.00%
▷ Concrete classes31100.00%
▷ Final classes00.00%
Methods256
▷ Static methods135.08%
▷ Public methods24495.31%
▷ Protected methods00.00%
▷ Private methods124.69%
Functions226
▷ Named functions21595.13%
▷ Anonymous functions114.87%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

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 were not PNG files found in your plugin