10% fraudguard

Code Review | FraudGuard Plugin

WordPress plugin FraudGuard Plugin scored10%from 54 tests.

About plugin

  • Plugin page: fraudguard
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9.8
  • WordPress version: 6.3.1
  • First release: Oct 27, 2016
  • Latest release: Aug 8, 2018
  • Number of updates: 5
  • Update frequency: every 130.0 days
  • Top authors: fraudguard (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /566 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
It is recommended to fix the following installer errors
  • Install procedure had errors
    • > Notice in wp-content/plugins/fraudguard/fraudguard_plugin.php+108
    Trying to access array offset on value of type bool

Server metrics [RAM: ▼1.93MB] [CPU: ▼59.95ms] Passed 4 tests

Server-side resources used by FraudGuard Plugin
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.07 ▼1.405.06 ▼37.03
Dashboard /wp-admin2.09 ▼1.267.42 ▼59.84
Posts /wp-admin/edit.php2.09 ▼1.277.02 ▼48.95
Add New Post /wp-admin/post-new.php2.09 ▼3.806.33 ▼93.96
Media Library /wp-admin/upload.php2.09 ▼1.146.86 ▼29.75

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for FraudGuard Plugin
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲7014.41 ▼0.002.01 ▲0.0946.37 ▲2.06
Dashboard /wp-admin2,237 ▲374.84 ▼1.03111.87 ▲8.7839.82 ▼0.70
Posts /wp-admin/edit.php2,116 ▲161.98 ▼0.0835.27 ▼6.0935.13 ▼1.94
Add New Post /wp-admin/post-new.php1,562 ▲3623.20 ▲5.78673.28 ▲21.7268.54 ▲20.24
Media Library /wp-admin/upload.php1,416 ▲164.18 ▼0.0296.35 ▼12.5443.94 ▼4.64

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/fraudguard/fraudguard_plugin.php+108
    Trying to access array offset on value of type bool
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts

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
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/fraudguard/fraudguard_plugin.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === fraudguard === )
The official readme.txt is a good inspiration

fraudguard/fraudguard_plugin.php 92% from 13 tests

The principal PHP file in "FraudGuard Plugin" v. 1.1 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("fraudguard.php" instead of "fraudguard_plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected92 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1303592

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There are no PNG files in this plugin