64% riskseal-anti-fraud-solution-for-woocommerce

Code Review | RiskSeal Anti-Fraud Solution for WooCommerce

WordPress plugin RiskSeal Anti-Fraud Solution for WooCommerce scored64%from 54 tests.

About plugin

  • Plugin page: riskseal-anti-fra...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.1.1
  • WordPress version: 6.3.1
  • First release: Mar 30, 2023
  • Latest release: Mar 31, 2023
  • Number of updates: 8
  • Update frequency: every 0.4 days
  • Top authors: artemriskseal (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /104 total downloads

Benchmarks

Plugin footprint 48% 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.00MB] [CPU: ▼0.78ms] Passed 4 tests

Server-side resources used by RiskSeal Anti-Fraud Solution for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.55 ▲1.06
Dashboard /wp-admin3.31 ▲0.0048.95 ▼0.14
Posts /wp-admin/edit.php3.36 ▲0.0049.95 ▼0.48
Add New Post /wp-admin/post-new.php5.89 ▲0.0088.58 ▼0.64
Media Library /wp-admin/upload.php3.23 ▲0.0034.53 ▼1.85

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 25 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

RiskSeal Anti-Fraud Solution for WooCommerce: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,840 ▲7913.25 ▼1.122.25 ▲0.3743.77 ▲2.84
Dashboard /wp-admin2,221 ▲185.83 ▲0.96117.58 ▲6.2343.27 ▼1.57
Posts /wp-admin/edit.php2,100 ▼02.00 ▼0.0535.81 ▼7.0335.84 ▼3.92
Add New Post /wp-admin/post-new.php1,545 ▼022.81 ▼0.20661.04 ▲48.8753.57 ▲9.05
Media Library /wp-admin/upload.php1,403 ▲34.28 ▲0.00102.80 ▼1.2542.33 ▼2.54

Uninstaller [IO: ▲1.33MB] [DB: ▲0.00MB] 25% 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 cannot be uninstalled
    • > Error in wp-content/plugins/riskseal-anti-fraud-solution-for-woocommerce/uninstall.php+18
    Uncaught Error: Call to undefined function WC() in wp-content/plugins/riskseal-anti-fraud-solution-for-woocommerce/uninstall.php:18
    Stack trace:
    #0 wp-admin/includes/plugin.php(1245): include_once()
    #1 wp-admin/includes/plugin.php(960): uninstall_plugin()
  • The plugin did not uninstall successfully, leaving 25 files (1.33MB) in the plugin directory
    • (new file) css/fork-awesome.min.css
    • (new file) css/v5-compat.css
    • (new file) config.php
    • (new file) fonts/forkawesome-webfont.eot
    • (new file) css/fork-awesome.min.css.map
    • (new file) changelog.txt
    • (new file) css/fork-awesome.css
    • (new file) css/v5-compat.min.css
    • (new file) css/v5-compat.min.css.map
    • (new file) README.md
    • ...
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • recovery_mode_email_last_sent

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/riskseal-anti-fraud-solution-for-woocommerce/config.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/riskseal-anti-fraud-solution-for-woocommerce/lib/plugin-links.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/riskseal-anti-fraud-solution-for-woocommerce/lib/riskseal-cron.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% 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: chargeback prevention, prevent fake orders, fraud prevention, security, fraud detection

riskseal-anti-fraud-solution-for-woocommerce/riskseal.php 92% from 13 tests

"RiskSeal Anti-Fraud Solution for WooCommerce" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("riskseal-anti-fraud-solution-for-woocommerce.php" instead of "riskseal.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected6,916 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
SVG1033,229
CSS416363,151
PHP10117104528
JavaScript1206
Markdown1002

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity9.75
▷ Minimum class complexity5.00
▷ Maximum class complexity20.00
Average method complexity3.19
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods16
▷ Static methods16100.00%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin