83% trust-swiftly-verification

Code Review | Top Identity Verifications for WooCommerce | Trust Swiftly

WordPress plugin Top Identity Verifications for WooCommerce | Trust Swiftly scored83%from 54 tests.

About plugin

  • Plugin page: trust-swiftly-ver...
  • Plugin version: 1.1.8
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.4.1
  • WordPress version: 6.3.1
  • First release: Aug 11, 2022
  • Latest release: Nov 21, 2023
  • Number of updates: 30
  • Update frequency: every 15.6 days
  • Top authors: trustswiftly (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,807 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼0.01MB] [CPU: ▼9.21ms] Passed 4 tests

An overview of server-side resources used by Top Identity Verifications for WooCommerce | Trust Swiftly
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0034.84 ▼7.31
Dashboard /wp-admin3.31 ▼0.0444.53 ▼21.95
Posts /wp-admin/edit.php3.36 ▲0.0049.29 ▲0.67
Add New Post /wp-admin/post-new.php5.89 ▲0.0097.51 ▼6.40
Media Library /wp-admin/upload.php3.23 ▲0.0033.29 ▼1.16

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Top Identity Verifications for WooCommerce | Trust Swiftly
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲4314.24 ▼0.121.58 ▼0.1436.22 ▼8.92
Dashboard /wp-admin2,192 ▲145.62 ▼0.0494.81 ▼20.0347.34 ▲0.87
Posts /wp-admin/edit.php2,103 ▲32.00 ▼0.0039.55 ▼2.2036.79 ▼2.35
Add New Post /wp-admin/post-new.php1,526 ▼1023.44 ▲2.46679.87 ▲10.5853.59 ▲4.53
Media Library /wp-admin/upload.php1,400 ▲34.21 ▲0.0295.33 ▼3.1142.20 ▼1.73

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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
The following issues need your attention
  • 59× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Exception\\GuzzleException' not found in wp-content/plugins/trust-swiftly-verification/vendor/guzzlehttp/guzzle/src/Exception/InvalidArgumentException.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\TransferException' not found in wp-content/plugins/trust-swiftly-verification/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/trust-swiftly-verification/views/post-order-verification.php:3
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Client\\ClientExceptionInterface' not found in wp-content/plugins/trust-swiftly-verification/vendor/psr/http-client/src/RequestExceptionInterface.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'TrustSwiftly\\Api\\Client' not found in wp-content/plugins/trust-swiftly-verification/lib/TrustSwiftly/Api/Validation/CredentialValidationClient.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\RequestInterface' not found in wp-content/plugins/trust-swiftly-verification/vendor/guzzlehttp/psr7/src/Request.php:15
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Handler\\CurlFactoryInterface' not found in wp-content/plugins/trust-swiftly-verification/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php:20
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\ResponseInterface' not found in wp-content/plugins/trust-swiftly-verification/vendor/guzzlehttp/psr7/src/Response.php:13
    • > PHP Notice
      Undefined variable: isVerified in wp-content/plugins/trust-swiftly-verification/views/post-order-verification.php on line 1
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\BadResponseException' not found in wp-content/plugins/trust-swiftly-verification/vendor/guzzlehttp/guzzle/src/Exception/ServerException.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: age verify, fraud prevention, woocommerce, verify id, identity verification

trust-swiftly-verification/trustswiftly-verification.php 77% from 13 tests

The main PHP script in "Top Identity Verifications for WooCommerce | Trust Swiftly" version 1.1.8 is automatically included on every request by WordPress
The following require your attention:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 205 characters long)
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes
  • Main file name: The principal plugin file should be the same as the plugin slug ("trust-swiftly-verification.php" instead of "trustswiftly-verification.php")

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
No dangerous file extensions were detected15,776 lines of code in 203 files:
LanguageFilesBlank linesComment linesLines of code
PHP1592,5276,28510,864
Markdown161,21603,574
JSON1300956
JavaScript4276238
CSS3203122
make1409
YAML1007
SVG6006

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity11.48
▷ Minimum class complexity1.00
▷ Maximum class complexity88.00
Average method complexity2.72
▷ Minimum method complexity1.00
▷ Maximum method complexity44.00
Code structure
Namespaces29
Interfaces30
Traits3
Classes108
▷ Abstract classes00.00%
▷ Concrete classes108100.00%
▷ Final classes3431.48%
Methods868
▷ Static methods14016.13%
▷ Public methods74786.06%
▷ Protected methods121.38%
▷ Private methods10912.56%
Functions141
▷ Named functions4834.04%
▷ Anonymous functions9365.96%
Constants85
▷ Global constants11.18%
▷ Class constants8498.82%
▷ Public constants7386.90%

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
2 PNG files occupy 0.09MB with 0.03MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/banner-772x250.png78.61KB84.60KB0.00%
assets/icon-128x128.png17.65KB6.88KB▼ 61.02%