78% add-spam-filters

Code Review | Add Spam Filters

WordPress plugin Add Spam Filters scored78%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: 6.3.1
  • 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 /747 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

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

A check of server-side resources used by Add Spam Filters
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0542.11 ▼3.51
Dashboard /wp-admin3.36 ▲0.0654.93 ▲0.27
Posts /wp-admin/edit.php3.41 ▲0.0647.38 ▼3.75
Add New Post /wp-admin/post-new.php5.94 ▲0.0684.21 ▼23.98
Media Library /wp-admin/upload.php3.28 ▲0.0638.74 ▲3.15
Add Spam Filters /wp-admin/users.php?page=add_spam_filters3.3132.62

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Add Spam Filters
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.28 ▲0.001.78 ▼0.0742.33 ▼0.95
Dashboard /wp-admin2,196 ▲195.63 ▲0.0198.96 ▲1.3043.10 ▼1.30
Posts /wp-admin/edit.php2,104 ▲41.99 ▲0.0134.07 ▼5.5935.83 ▼2.63
Add New Post /wp-admin/post-new.php1,530 ▼523.42 ▲5.23661.43 ▲14.2571.19 ▼4.50
Media Library /wp-admin/upload.php1,404 ▲14.29 ▲0.13100.28 ▲4.2943.86 ▼0.04
Add Spam Filters /wp-admin/users.php?page=add_spam_filters9642.0023.2729.24

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

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

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
  • 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 take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > 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
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed: Please take inspiration from this readme.txt

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

"Add Spam Filters" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Text Domain: Please use dashes and lowercase characters for text domains

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
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

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin