62% ipqualityscore-fraud-detection

Code Review | IPQualityScore Fraud Detection

WordPress plugin IPQualityScore Fraud Detection scored 62% from 54 tests.

About plugin

  • Plugin page: ipqualityscore-fr...
  • Plugin version: 1.83
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0-5.8.1
  • WordPress version: 5.8.1
  • First release: May 31, 2018
  • Latest release: Oct 20, 2021
  • Number of updates: 31
  • Update frequency: every 40.0 days
  • Top authors: ipqualityscore (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

100+ active / 4,117 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.30MB] [CPU: ▼146.69ms] Passed 4 tests

Server-side resources used by IPQualityScore Fraud Detection
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.12 ▲0.2942.70 ▲5.40
Dashboard /wp-admin3.41 ▲0.3651.50 ▲2.15
Posts /wp-admin/edit.php3.46 ▲0.3654.71 ▲3.84
Add New Post /wp-admin/post-new.php5.71 ▲0.2894.79 ▼591.03
Media Library /wp-admin/upload.php3.30 ▲0.2934.09 ▼1.71
/wp-admin/admin.php?page=ipq_oauth_success3.2025.21
/wp-admin/admin.php?page=ipq_oauth_failure3.2629.83

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 36 new files
Database: 2 new tables, 9 new options
New tables
wp_ipqs_email_cache
wp_ipqs_cache
New WordPress options
ipq_device_tracker_orders
ipq_database_version
ipq_allow_public_access_points
ipqualityscore_key
ipq_allow_crawlers
ipq_strictness
ipq_loading_order_post_id
ipq_block_order_post_id
ipq_allow_timed_out_emails

Browser metrics Passed 4 tests

Checking browser requirements for IPQualityScore Fraud Detection
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,701 ▲10516.03 ▲0.4911.18 ▲0.0348.56 ▼0.55
Dashboard /wp-admin2,958 ▲275.90 ▼0.08144.63 ▼9.17121.19 ▲1.02
Posts /wp-admin/edit.php2,752 ▲132.70 ▼0.0267.13 ▼5.5284.05 ▼5.77
Add New Post /wp-admin/post-new.php1,683 ▼018.55 ▼0.22410.02 ▼7.56109.44 ▼4.11
Media Library /wp-admin/upload.php1,749 ▼615.04 ▲0.02143.18 ▼12.98130.80 ▲11.77
/wp-admin/admin.php?page=ipq_oauth_success110.900.063.71
/wp-admin/admin.php?page=ipq_oauth_failure1,0062.0961.4837.00

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_ipqs_email_cache
  • This plugin did not uninstall successfully, leaving 2 options in the database
    • ipq_loading_order_post_id
    • ipq_block_order_post_id

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Please take a closer look at the following
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/ipqualityscore-fraud-detection/templates/SettingsTable.php
    • > /wp-content/plugins/ipqualityscore-fraud-detection/templates/BeforeOrderAlways.php
  • 28× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Notice
      Undefined variable: setting in wp-content/plugins/ipqualityscore-fraud-detection/templates/SettingsTable.php on line 11
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/ipqualityscore-fraud-detection/templates/AdminOrderPanel.php on line 12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/ipqualityscore-fraud-detection/IPQualityScore.php:1684
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_style() in wp-content/plugins/ipqualityscore-fraud-detection/templates/Wrapper.php:1
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/ipqualityscore-fraud-detection/templates/AdminOrderPanel.php on line 4
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/ipqualityscore-fraud-detection/templates/SettingsTable.php on line 9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_script() in wp-content/plugins/ipqualityscore-fraud-detection/templates/OrderAfter.php:2
    • > PHP Notice
      Undefined variable: setting in wp-content/plugins/ipqualityscore-fraud-detection/templates/SettingsTable.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_add_inline_script() in wp-content/plugins/ipqualityscore-fraud-detection/templates/EvictFailure.php:11
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/ipqualityscore-fraud-detection/templates/SettingsTable.php on line 13

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
These are user-side errors you should fix
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=ipq_oauth_failure
    • > Network (severe)
    wp-content/plugins/ipqualityscore-fraud-detection/js/Evict.js?ver=5.8.1 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Screenshots: Add images for these screenshots: #3 (Another preview of the risk analysis for orders.), #4 (Fraud Score available when reviewing recent WooCommerce orders.)
  • Tags: There are too many tags (14 tag instead of maximum 10)
Please take inspiration from this readme.txt

ipqualityscore-fraud-detection/IPQualityScore.php 85% from 13 tests

This is the main PHP file of "IPQualityScore Fraud Detection" version 1.83, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 414 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("ipqualityscore-fraud-detection.php" instead of "IPQualityScore.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
Good job! No executable or dangerous file extensions detected2,552 lines of code in 28 files:
LanguageFilesBlank linesComment linesLines of code
PHP122631331,965
JavaScript10314457
CSS4120125
HTML2005

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.85
Average class complexity318.00
▷ Minimum class complexity318.00
▷ Maximum class complexity318.00
Average method complexity6.23
▷ Minimum method complexity1.00
▷ Maximum method complexity41.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods61
▷ Static methods00.00%
▷ Public methods3252.46%
▷ Protected methods00.00%
▷ Private methods2947.54%
Functions14
▷ Named functions642.86%
▷ Anonymous functions857.14%
Constants13
▷ Global constants00.00%
▷ Class constants13100.00%
▷ Public constants13100.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
6 PNG files occupy 0.13MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
templates/assets/logo-email.png12.74KB7.27KB▼ 42.93%
assets/screenshot-2.png19.00KB10.34KB▼ 45.57%
assets/screenshot-4.png14.04KB8.39KB▼ 40.28%
assets/screenshot-1.png76.88KB37.99KB▼ 50.58%
assets/screenshot-3.png14.04KB8.39KB▼ 40.28%