83% spampatrol

Code Review | SpamPatrol

WordPress plugin SpamPatrol scored83%from 54 tests.

About plugin

  • Plugin page: spampatrol
  • Plugin version: 1.35.16
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2
  • WordPress version: 6.3.1
  • First release: Jun 8, 2023
  • Latest release: Jun 9, 2023
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: spampatrol (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /89 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼5.27ms] Passed 4 tests

Analyzing server-side resources used by SpamPatrol
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0740.08 ▲2.24
Dashboard /wp-admin3.36 ▲0.0249.73 ▼7.21
Posts /wp-admin/edit.php3.48 ▲0.1245.76 ▲1.18
Add New Post /wp-admin/post-new.php5.95 ▲0.0683.14 ▼17.30
Media Library /wp-admin/upload.php3.29 ▲0.0638.34 ▲6.25
SpamPatrol /wp-admin/options-general.php?page=spampatrol-plugin3.2328.63

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 10 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
spampatrol_settings
theysaidso_admin_options
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for SpamPatrol
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲714.27 ▼0.081.83 ▲0.0644.05 ▲3.89
Dashboard /wp-admin2,196 ▲185.55 ▼0.0686.89 ▼10.2438.65 ▼6.60
Posts /wp-admin/edit.php2,104 ▲42.02 ▲0.0633.56 ▼8.6134.68 ▲0.41
Add New Post /wp-admin/post-new.php1,529 ▲123.60 ▲0.60667.61 ▼25.2354.93 ▲5.89
Media Library /wp-admin/upload.php1,398 ▼24.12 ▼0.04108.84 ▲4.5045.33 ▲0.17
SpamPatrol /wp-admin/options-general.php?page=spampatrol-plugin8621.9922.4628.31

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
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • spampatrol_settings

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=spampatrol-plugin
    • > Notice in wp-content/plugins/spampatrol/admin.php+73
    Undefined index: alt_recipient
    • > GET request to /wp-admin/options-general.php?page=spampatrol-plugin
    • > Notice in wp-content/plugins/spampatrol/admin.php+80
    Undefined index: subject_prefix

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Donate link: Please fix this invalid URI: ""
  • Requires php: Version not formatted correctly
The official readme.txt might help

spampatrol/index.php 92% from 13 tests

The primary PHP file in "SpamPatrol" version 1.35.16 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("spampatrol.php" instead of "index.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
Good job! No executable or dangerous file extensions detected375 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP96975375

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity12.50
▷ Minimum class complexity12.00
▷ Maximum class complexity13.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions12
▷ Named functions866.67%
▷ Anonymous functions433.33%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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 were not PNG files found in your plugin