78% fraudradar

Code Review | FraudRadar

WordPress plugin FraudRadar scored78%from 54 tests.

About plugin

  • Plugin page: fraudradar
  • Plugin version: 2.1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.0
  • WordPress version: 6.3.1
  • First release: Mar 12, 2021
  • Latest release: Aug 3, 2023
  • Number of updates: 25
  • Update frequency: every 35.2 days
  • Top authors: fraudradar (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,805 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.21MB] [CPU: ▼1.25ms] Passed 4 tests

Server-side resources used by FraudRadar
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1842.06 ▼4.33
Dashboard /wp-admin3.55 ▲0.2546.47 ▼6.26
Posts /wp-admin/edit.php3.60 ▲0.2550.14 ▲2.40
Add New Post /wp-admin/post-new.php6.09 ▲0.2198.65 ▲3.20
Media Library /wp-admin/upload.php3.41 ▲0.1942.91 ▲7.07

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 28 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
fraudradar_plugin_options
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by FraudRadar
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,913 ▲15213.79 ▼0.568.86 ▲7.1442.42 ▼0.23
Dashboard /wp-admin2,208 ▲345.65 ▲0.0890.88 ▼17.1942.04 ▼1.01
Posts /wp-admin/edit.php2,119 ▲192.00 ▲0.0438.43 ▲3.0436.27 ▲1.71
Add New Post /wp-admin/post-new.php1,539 ▲1123.68 ▲0.39667.84 ▼2.8468.16 ▲4.73
Media Library /wp-admin/upload.php1,416 ▲164.22 ▼0.0698.64 ▼6.8043.14 ▼3.75

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/fraudradar/public/partials/fraudradar-public-display.php
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/fraudradar/admin/FraudRadarAdmin.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/fraudradar/includes/FraudRadarClient.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/fraudradar/includes/FraudRadarDeactivator.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/fraudradar/includes/FraudRadarActivator.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/fraudradar/includes/FraudRadarWoocommerce.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/fraudradar/includes/FraudRadarWooCommerceIntegration.php:65

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: spam, login, fraud, otp, registration

fraudradar/fraudradar-wp-plugin.php 77% from 13 tests

The principal PHP file in "FraudRadar" v. 2.1.0 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 195 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 ("fraudradar.php" instead of "fraudradar-wp-plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected1,466 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP183047161,291
JavaScript22627133
CSS26842

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity8.85
▷ Minimum class complexity1.00
▷ Maximum class complexity32.00
Average method complexity2.13
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes13
▷ Abstract classes00.00%
▷ Concrete classes13100.00%
▷ Final classes00.00%
Methods90
▷ Static methods2831.11%
▷ Public methods8291.11%
▷ Protected methods00.00%
▷ Private methods88.89%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants33
▷ Global constants13.03%
▷ Class constants3296.97%
▷ Public constants32100.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