74% antispam

Code Review | Antispam

WordPress plugin Antispam scored74%from 54 tests.

About plugin

  • Plugin page: antispam
  • Plugin version: 1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-4.7
  • WordPress version: 6.3.1
  • First release: Apr 26, 2016
  • Latest release: Dec 29, 2016
  • Number of updates: 16
  • Update frequency: every 16.3 days
  • Top authors: eugenbobrowski (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

300+ active /4,927 total downloads

Benchmarks

Plugin footprint 65% from 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: ▲0.05MB] [CPU: ▲1.02ms] Passed 4 tests

An overview of server-side resources used by Antispam
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0346.85 ▲4.43
Dashboard /wp-admin3.36 ▲0.0556.52 ▲4.46
Posts /wp-admin/edit.php3.47 ▲0.1251.09 ▲1.74
Add New Post /wp-admin/post-new.php5.94 ▲0.0593.98 ▼2.66
Media Library /wp-admin/upload.php3.28 ▲0.0539.86 ▲0.57
Antispam /wp-admin/tools.php?page=antispam-statistic3.2639.61

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 10 new files
Database: 1 new table, 7 new options
New tables
wp_comments_antispam_log
New WordPress options
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
antispam_db_version
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Antispam
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,951 ▲19013.58 ▼1.175.97 ▲4.3742.87 ▼2.80
Dashboard /wp-admin2,229 ▲295.83 ▲0.93101.13 ▼8.3644.78 ▲5.77
Posts /wp-admin/edit.php2,120 ▲202.01 ▼0.0435.75 ▼8.9936.80 ▲3.96
Add New Post /wp-admin/post-new.php1,559 ▲1423.04 ▼0.03600.24 ▼74.3459.71 ▼21.02
Media Library /wp-admin/upload.php1,420 ▲204.28 ▼0.0799.61 ▼12.1642.73 ▼1.33
Antispam /wp-admin/tools.php?page=antispam-statistic8342.0468.9968.32

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_comments_antispam_log
  • Zombie WordPress options were found after uninstall: 7 options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • antispam_db_version
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/antispam/admin/admin.php:115

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Screenshots: These screenshots do not have images: #1 (Spam comment is rejected), #2 (Antispam statistic page)
Please take inspiration from this readme.txt

antispam/comments-antispam.php 92% from 13 tests

The main PHP script in "Antispam" version 1.5 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("antispam.php" instead of "comments-antispam.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin1,292 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript330411,025
PHP48238267

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity6.75
▷ Minimum class complexity1.00
▷ Maximum class complexity20.00
Average method complexity2.35
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods17
▷ Static methods317.65%
▷ Public methods1588.24%
▷ Protected methods00.00%
▷ Private methods211.76%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
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
2 PNG files occupy 0.08MB with 0.04MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png4.52KB2.70KB▼ 40.29%
screenshot-2.png79.19KB31.17KB▼ 60.64%