84% critical-net-fraud-prevention

Code Review | Critical.net - Fraud Detector and Chargeback Prevention Solution

WordPress plugin Critical.net - Fraud Detector and Chargeback Prevention Solution scored84%from 54 tests.

About plugin

  • Plugin page: critical-net-frau...
  • Plugin version: 1.15.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8.1-6.2.1
  • WordPress version: 6.3.1
  • First release: Dec 21, 2021
  • Latest release: May 19, 2023
  • Number of updates: 33
  • Update frequency: every 15.8 days
  • Top authors: ctcplugin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,502 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▼0.56MB] [CPU: ▼16.86ms] Passed 4 tests

A check of server-side resources used by Critical.net - Fraud Detector and Chargeback Prevention Solution
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1241.88 ▼0.18
Dashboard /wp-admin3.42 ▲0.1246.46 ▼2.27
Posts /wp-admin/edit.php3.53 ▲0.1848.59 ▼0.83
Add New Post /wp-admin/post-new.php3.30 ▼2.5933.50 ▼62.15
Media Library /wp-admin/upload.php3.34 ▲0.1235.95 ▼2.17

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 18 new files
Database: no new tables, 9 new options
New WordPress options

Browser metrics Passed 4 tests

Checking browser requirements for Critical.net - Fraud Detector and Chargeback Prevention Solution
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,820 ▲8513.29 ▼1.181.67 ▲0.0244.11 ▼3.86
Dashboard /wp-admin2,229 ▲384.88 ▼1.0099.16 ▼6.8231.87 ▼9.80
Posts /wp-admin/edit.php2,109 ▲202.06 ▲0.0337.31 ▲0.1133.91 ▲0.21
Add New Post /wp-admin/post-new.php1,684 ▲17122.60 ▲5.15653.80 ▼30.4547.58 ▼9.17
Media Library /wp-admin/upload.php1,478 ▲934.24 ▼0.0095.75 ▼18.3740.91 ▼9.37

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • cnfp_front_url

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/critical-net-fraud-prevention/templates/admin-settings.php:33

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


Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: fraud detector, blacklist customer, chargeback prevention, prevent fake orders, fraud prevention

critical-net-fraud-prevention/critical-net-fraud-prevention.php 92% from 13 tests

The main PHP file in "Critical.net - Fraud Detector and Chargeback Prevention Solution" ver. 1.15.0 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 243 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin631 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity7.09
▷ Minimum class complexity1.00
▷ Maximum class complexity22.00
Average method complexity2.97
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes19.09%
▷ Static methods1028.57%
▷ Public methods3394.29%
▷ Protected methods12.86%
▷ Private methods12.86%
▷ Named functions480.00%
▷ Anonymous functions120.00%
▷ Global constants4100.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