83% spam-master

Code Review | Spam Master

WordPress plugin Spam Master scored 83% from 54 tests.

About plugin

  • Plugin page: spam-master
  • Plugin version: 6.7.3
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.9.2
  • WordPress version: 5.9.2
  • First release: Oct 1, 2013
  • Latest release: Mar 11, 2022
  • Number of updates: 280
  • Update frequency: every 11.0 days
  • Top authors: TechGasp (100%)

Code review

54 tests

User reviews

65 reviews

Install metrics

500+ active / 79,931 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲1.03MB] [CPU: ▼268.83ms] Passed 4 tests

An overview of server-side resources used by Spam Master
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.60 ▲1.4782.13 ▲62.01
Dashboard /wp-admin4.44 ▲1.0360.33 ▼24.96
Posts /wp-admin/edit.php4.66 ▲1.0262.19 ▲23.55
Add New Post /wp-admin/post-new.php7.97 ▲1.00122.74 ▼1,135.90
Media Library /wp-admin/upload.php4.38 ▲1.08117.37 ▲91.31

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 63 new files
Database: 1 new table, 12 new options
New tables
wp_spam_master_keys
New WordPress options
spam_master_connection
spam_master_upgrade_to_6_7_2
spam_master_upgrade_to_6_6_19
spam_master_upgrade_to_6_6_2
spam_master_upgrade_to_6_7_0
spam_master_upgrade_to_6_6_5
spam_master_upgrade_to_6_6_1
spam_master_keys_db_version
spam_master_upgrade_to_6_6_0
spam_master_upgrade_to_6_6_3
...

Browser metrics Passed 4 tests

Spam Master: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,784 ▲2915.54 ▼0.115.98 ▼0.172.38 ▼0.94
Dashboard /wp-admin2,875 ▲146.12 ▼0.04116.03 ▼20.35141.97 ▼25.95
Posts /wp-admin/edit.php2,685 ▲13.24 ▲0.0066.71 ▼30.08187.59 ▲29.23
Add New Post /wp-admin/post-new.php1,689 ▼2820.47 ▼0.79489.44 ▲38.37159.72 ▼27.81
Media Library /wp-admin/upload.php1,695 ▼35.53 ▲0.00155.68 ▲11.91185.60 ▼9.43
Spam Master /wp-admin/spam-master.php260.940.0321.10

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

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
The following issues need your attention
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/spam-master/includes/admin/spam-master-admin-status-table.php
  • 38× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_multisite() in wp-content/plugins/spam-master/includes/protection/spam-master-signatures.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_multisite() in wp-content/plugins/spam-master/includes/admin/spam-master-admin-upgrade-to-6-6-5.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_multisite() in wp-content/plugins/spam-master/includes/admin/spam-master-admin-connection-sender.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_multisite() in wp-content/plugins/spam-master/includes/admin/spam-master-admin-upgrade-to-6.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/spam-master/includes/protection/spam-master-action.php:69
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_multisite() in wp-content/plugins/spam-master/includes/admin/spam-master-admin-upgrade-to-6-6-1.php:4
    • > PHP Warning
      constant(): Couldn't find constant SPAM_MASTER_NAME in wp-content/plugins/spam-master/includes/admin/spam-master-admin-footer.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_multisite() in wp-content/plugins/spam-master/includes/protection/spam-master-woocommerce-sig.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/spam-master/includes/admin/spam-master-admin-footer.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_multisite() in wp-content/plugins/spam-master/includes/protection/spam-master-shortcodes.php:4

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There are user-side issues you should fix
    • > GET request to /wp-admin/spam-master.php
    • > Network (severe)
    wp-admin/spam-master.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
8 plugin tags: firewall, anti-flood, brute force, spam, anti-crawler...

spam-master/spam-master.php Passed 13 tests

"Spam Master" version 6.7.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
135 characters long description:
Spam Master is the Ultimate Spam Protection plugin that blocks new user registrations and post comments with Real Time anti-spam lists.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin10,408 lines of code in 52 files:
LanguageFilesBlank linesComment linesLines of code
PHP486791,0549,612
CSS3589766
HTML103730

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity28.07
▷ Minimum class complexity3.00
▷ Maximum class complexity168.00
Average method complexity6.34
▷ Minimum method complexity1.00
▷ Maximum method complexity32.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes15
▷ Abstract classes00.00%
▷ Concrete classes15100.00%
▷ Final classes00.00%
Methods62
▷ Static methods23.23%
▷ Public methods62100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions64
▷ Named functions6398.44%
▷ Anonymous functions11.56%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/spam-master-stars.png3.92KB1.88KB▼ 51.94%
images/spammaster-logo.png1.46KB1.32KB▼ 9.81%