83% autentify-anti-fraud-for-woocommerce

Code Review | Autentify anti fraud for WooCommerce

WordPress plugin Autentify anti fraud for WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: autentify-anti-fr...
  • Plugin version: 2.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.9.3
  • WordPress version: 6.3.1
  • First release: Sep 25, 2020
  • Latest release: Apr 19, 2022
  • Number of updates: 12
  • Update frequency: every 47.6 days
  • Top authors: autentify (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /626 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
Installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼7.01ms] Passed 4 tests

An overview of server-side resources used by Autentify anti fraud for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0538.84 ▼4.15
Dashboard /wp-admin3.36 ▲0.0651.27 ▼1.19
Posts /wp-admin/edit.php3.47 ▲0.1249.51 ▼4.94
Add New Post /wp-admin/post-new.php5.94 ▲0.0685.69 ▼17.76
Media Library /wp-admin/upload.php3.28 ▲0.0638.61 ▲0.83

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 28 new files
Database: no new tables, 8 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
autentify_api_token
widget_recent-posts
widget_recent-comments
autentify_auto_order_check

Browser metrics Passed 4 tests

Checking browser requirements for Autentify anti fraud for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,854 ▲10814.48 ▲0.101.96 ▲0.3542.81 ▲2.25
Dashboard /wp-admin2,238 ▲474.87 ▼0.03101.24 ▲0.8343.12 ▲0.18
Posts /wp-admin/edit.php2,117 ▲251.99 ▼0.0035.22 ▼6.2336.05 ▲0.74
Add New Post /wp-admin/post-new.php1,555 ▲4123.57 ▲6.04663.07 ▲52.7664.33 ▲2.16
Media Library /wp-admin/upload.php1,414 ▲294.21 ▲0.0499.94 ▼0.9246.49 ▲3.15

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 8× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/autentify-anti-fraud-for-woocommerce/includes/admin-menu.php:2
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/autentify-anti-fraud-for-woocommerce/includes/user_roles.php on line 2
    • > PHP Warning
      require_once(ABSPATH/wp-includes/pluggable.php): failed to open stream: No such file or directory in wp-content/plugins/autentify-anti-fraud-for-woocommerce/includes/user_roles.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/autentify-anti-fraud-for-woocommerce/includes/autentify_activator.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_deactivation_hook() in wp-content/plugins/autentify-anti-fraud-for-woocommerce/includes/autentify_deactivator.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/autentify-anti-fraud-for-woocommerce/app/actions/autentify_autenti_mail_actions.php:63
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATH/wp-includes/pluggable.php' (include_path='.:/usr/share/php') in wp-content/plugins/autentify-anti-fraud-for-woocommerce/includes/user_roles.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/autentify-anti-fraud-for-woocommerce/app/actions/autentify_user_checks_actions.php:40

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
7 plugin tags: antifraud, fraud, intelligence, analyze, safety...

autentify-anti-fraud-for-woocommerce/autentify.php 77% from 13 tests

This is the main PHP file of "Autentify anti fraud for WooCommerce" version 2.0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 198 characters long)
  • Text Domain: The text domain should only use lowercase characters and dashes
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("autentify-anti-fraud-for-woocommerce.php" instead of "autentify.php")

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
There were no executable files found in this plugin1,115 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PHP202222091,022
JavaScript16043
CSS14029
PO File10221

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity9.00
▷ Minimum class complexity3.00
▷ Maximum class complexity22.00
Average method complexity2.49
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes00.00%
Methods64
▷ Static methods1117.19%
▷ Public methods4570.31%
▷ Protected methods00.00%
▷ Private methods1929.69%
Functions26
▷ Named functions26100.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants9100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin