78% astounding-spam-prevention

Code Review | Astounding Spam Prevention

WordPress plugin Astounding Spam Prevention scored78%from 54 tests.

About plugin

  • Plugin page: astounding-spam-p...
  • Plugin version: 1.19
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.2
  • WordPress version: 6.3.1
  • First release: Jun 29, 2017
  • Latest release: Oct 22, 2023
  • Number of updates: 29
  • Update frequency: every 79.6 days
  • Top authors: willjenkins (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

300+ active /5,498 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.19MB] [CPU: ▼3.89ms] Passed 4 tests

This is a short check of server-side resources used by Astounding Spam Prevention
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1939.21 ▲2.40
Dashboard /wp-admin3.49 ▲0.1948.48 ▲4.28
Posts /wp-admin/edit.php3.60 ▲0.2545.41 ▼6.51
Add New Post /wp-admin/post-new.php6.09 ▲0.2180.20 ▼13.34
Media Library /wp-admin/upload.php3.41 ▲0.1936.70 ▲1.89
Astounding Spam Prevention /wp-admin/options-general.php?page=astound_control3.4832.10

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 42 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
astound_options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Astounding Spam Prevention
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,797 ▲3614.44 ▼0.091.77 ▲0.2243.54 ▼1.11
Dashboard /wp-admin2,206 ▲295.64 ▲0.0185.98 ▲2.0441.40 ▼0.23
Posts /wp-admin/edit.php2,108 ▲111.99 ▼0.0333.34 ▼3.9534.47 ▲1.57
Add New Post /wp-admin/post-new.php1,533 ▲723.41 ▲0.33616.26 ▼88.3854.94 ▼2.59
Media Library /wp-admin/upload.php1,408 ▲84.20 ▼0.0993.46 ▼12.6740.23 ▼7.21
Astounding Spam Prevention /wp-admin/options-general.php?page=astound_control1,7872.0022.4145.97

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 50% 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)
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=astound_control
    • > Notice in wp-content/plugins/astounding-spam-prevention/includes/astound-admin-options.php+785
    Undefined variable: hip
    • > GET request to /wp-admin/options-general.php?page=astound_control
    • > Notice in wp-content/plugins/astounding-spam-prevention/includes/astound-admin-options.php+787
    Undefined variable: email
    • > GET request to /wp-admin/options-general.php?page=astound_control
    • > Notice in wp-content/plugins/astounding-spam-prevention/includes/astound-admin-options.php+790
    Undefined variable: author
    • > GET request to /wp-admin/options-general.php?page=astound_control
    • > Notice in wp-content/plugins/astounding-spam-prevention/includes/astound-admin-options.php+793
    Undefined variable: subject
    • > GET request to /wp-admin/options-general.php?page=astound_control
    • > Notice in wp-content/plugins/astounding-spam-prevention/includes/astound-admin-options.php+796
    Undefined variable: comment

SRP 50% 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
Please fix the following items
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'astound_module' not found in wp-content/plugins/astounding-spam-prevention/modules/astound_chkwlist.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'astound_module' not found in wp-content/plugins/astounding-spam-prevention/modules/astound_chktor.php:2

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 undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Tags: There are too many tags (22 tag instead of maximum 10)
The official readme.txt is a good inspiration

astounding-spam-prevention/astound-spam-prevention.php 92% from 13 tests

The main file in "Astounding Spam Prevention" v. 1.19 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("astounding-spam-prevention.php" instead of "astound-spam-prevention.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
Everything looks great! No dangerous files found in this plugin25,986 lines of code in 41 files:
LanguageFilesBlank linesComment linesLines of code
PHP392154,86325,587
JavaScript1196317
CSS111682

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.54
Average class complexity7.17
▷ Minimum class complexity1.00
▷ Maximum class complexity24.00
Average method complexity8.12
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes30
▷ Abstract classes00.00%
▷ Concrete classes30100.00%
▷ Final classes00.00%
Methods26
▷ Static methods13.85%
▷ Public methods26100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions57
▷ Named functions57100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
PNG images were not found in this plugin