88% add-spam-filters

Code Review | Add Spam Filters

WordPress plugin Add Spam Filters scored 88% from 54 tests.

About plugin

  • Plugin page: add-spam-filters
  • Plugin version: 1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.8.2
  • WordPress version: 5.9.2
  • First release: Jul 3, 2020
  • Latest release: Nov 13, 2021
  • Number of updates: 7
  • Update frequency: every 71.3 days
  • Top authors: adaptsites (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 356 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼0.01MB] [CPU: ▼294.97ms] Passed 4 tests

This is a short check of server-side resources used by Add Spam Filters
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0158.83 ▲3.21
Dashboard /wp-admin3.42 ▲0.0236.41 ▼1.23
Posts /wp-admin/edit.php3.66 ▲0.0241.92 ▲2.57
Add New Post /wp-admin/post-new.php6.90 ▼0.07106.60 ▼1,177.13
Media Library /wp-admin/upload.php3.31 ▲0.0125.58 ▼4.07
Add Spam Filters /wp-admin/users.php?page=add_spam_filters3.2524.09

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Add Spam Filters
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,768 ▲1415.84 ▲0.205.37 ▼0.112.32 ▲0.11
Dashboard /wp-admin2,894 ▲366.09 ▼0.07118.32 ▼13.16153.84 ▼6.45
Posts /wp-admin/edit.php2,696 ▲53.24 ▲0.0063.58 ▲0.46139.23 ▼2.20
Add New Post /wp-admin/post-new.php1,664 ▼2615.56 ▼2.85392.59 ▼9.01156.67 ▼0.79
Media Library /wp-admin/upload.php1,700 ▲25.55 ▲0.04139.42 ▼8.99191.63 ▼3.26
Add Spam Filters /wp-admin/users.php?page=add_spam_filters1,1842.4151.59118.71

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
This plugin's uninstaller ran successfully

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
  • 14 occurences, only the last one shown
    • > GET request to /wp-admin/users.php?page=add_spam_filters
    • > Notice in wp-content/plugins/add-spam-filters/add-spam-filters.php+389
    Trying to access array offset on value of type bool

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/add-spam-filters/add-spam-filters.php:173

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 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
Attributes that need to be fixed: You can look at the official readme.txt

add-spam-filters/add-spam-filters.php 92% from 13 tests

The main PHP script in "Add Spam Filters" version 1.0 is automatically included on every request by WordPress
It is important to fix the following:
  • Text Domain: The text domain should only use lowercase characters and dashes

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
Success! There were no dangerous files found in this plugin276 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP111737276

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.33
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%
Functions16
▷ Named functions16100.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
PNG images were not found in this plugin