89% fraudsentinel-bot-fraud-detection

Code Review | FraudSentinel Bots & Fraud Detection

WordPress plugin FraudSentinel Bots & Fraud Detection scored89%from 54 tests.

About plugin

  • Plugin page: fraudsentinel-bot...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.6
  • WordPress version: 6.3.1
  • First release: Jan 16, 2021
  • Latest release: Jan 17, 2021
  • Number of updates: 4
  • Update frequency: every 0.5 days
  • Top authors: fraudsentinel (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /366 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.02MB] [CPU: ▼6.28ms] Passed 4 tests

Server-side resources used by FraudSentinel Bots & Fraud Detection
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0245.29 ▲2.25
Dashboard /wp-admin3.33 ▲0.0252.00 ▼2.01
Posts /wp-admin/edit.php3.38 ▲0.0245.55 ▼7.83
Add New Post /wp-admin/post-new.php5.91 ▲0.0288.86 ▼15.83
Media Library /wp-admin/upload.php3.25 ▲0.0238.58 ▲0.54

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for FraudSentinel Bots & Fraud Detection
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,852 ▲9114.74 ▲0.322.18 ▲0.1049.85 ▲3.21
Dashboard /wp-admin2,233 ▲304.84 ▼0.98103.79 ▼11.2536.95 ▼6.84
Posts /wp-admin/edit.php2,109 ▲61.99 ▲0.0139.24 ▼4.9034.34 ▲0.61
Add New Post /wp-admin/post-new.php1,555 ▲2923.10 ▲5.62611.67 ▼76.1847.58 ▼20.46
Media Library /wp-admin/upload.php1,412 ▲154.23 ▲0.02100.95 ▼19.6841.30 ▼6.05

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments

Smoke tests Passed 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 Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser 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 describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Requires php: The plugin version is formatted incorrectly
The official readme.txt is a good inspiration

fraudsentinel-bot-fraud-detection/fraudsentinel.php 92% from 13 tests

Analyzing the main PHP file in "FraudSentinel Bots & Fraud Detection" version 1.0
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("fraudsentinel-bot-fraud-detection.php" instead of "fraudsentinel.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 detected406 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP28535406

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.46
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 functions675.00%
▷ Anonymous functions225.00%
Constants2
▷ Global constants2100.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
4 PNG files occupy 0.08MB with 0.04MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-2.png14.58KB6.22KB▼ 57.34%
trunk/assets/screenshot-2.png14.58KB6.22KB▼ 57.34%
assets/screenshot-1.png24.04KB9.79KB▼ 59.29%
trunk/assets/screenshot-1.png24.04KB9.79KB▼ 59.29%