90% analytical-spam-filter

Code Review | Analytical Spam Filter

WordPress plugin Analytical Spam Filter scored90%from 54 tests.

About plugin

  • Plugin page: analytical-spam-f...
  • Plugin version: 1.0.13
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.4
  • WordPress version: 6.3.1
  • First release: Jun 2, 2022
  • Latest release: Nov 21, 2023
  • Number of updates: 37
  • Update frequency: every 14.5 days
  • Top authors: dalesandro (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,760 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.34MB] [CPU: ▼2.27ms] Passed 4 tests

A check of server-side resources used by Analytical Spam Filter
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.67 ▲0.2138.54 ▼2.64
Dashboard /wp-admin3.75 ▲0.4049.63 ▼10.16
Posts /wp-admin/edit.php3.80 ▲0.4448.03 ▲0.73
Add New Post /wp-admin/post-new.php6.27 ▲0.3899.00 ▲2.99
Media Library /wp-admin/upload.php3.61 ▲0.3838.20 ▲6.63
Analytical Spam Filter /wp-admin/options-general.php?page=analytical-spam-filter-settings3.5834.52

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 6 new files
Database: 2 new tables, 11 new options
New tables
wp_analytical_spam_filter_content_history
wp_analytical_spam_filter_submitter_history
New WordPress options
analytical_spam_filter_database_version
can_compress_scripts
analytical_spam_filter_salt
widget_recent-comments
analytical_spam_filter_duration_field_id
analytical_spam_filter_honeypot_field_id
theysaidso_admin_options
widget_theysaidso_widget
analytical_spam_filter_hash_field_id
db_upgraded
...

Browser metrics Passed 4 tests

A check of browser resources used by Analytical Spam Filter
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,794 ▲3214.72 ▲0.381.73 ▲0.1543.86 ▼1.10
Dashboard /wp-admin2,199 ▲255.60 ▼0.0594.96 ▼1.5941.89 ▼3.96
Posts /wp-admin/edit.php2,104 ▲11.99 ▲0.0538.77 ▼3.6236.84 ▲1.37
Add New Post /wp-admin/post-new.php1,530 ▲423.45 ▲0.52657.18 ▲20.6053.07 ▼1.69
Media Library /wp-admin/upload.php1,404 ▲14.18 ▲0.0496.93 ▼1.5141.36 ▼2.89
Analytical Spam Filter /wp-admin/options-general.php?page=analytical-spam-filter-settings1,1342.0023.8134.40

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Looking good! No server-side errors or output on direct access of PHP files

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 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
10 plugin tags: protection, anti-spam, comment spam, spam, spam blocker...

analytical-spam-filter/analytical-spam-filter.php 92% from 13 tests

The principal PHP file in "Analytical Spam Filter" v. 1.0.13 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Domain Path: The domain path folder was not found ("/languages")

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 plugin1,386 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP4295591,366
JavaScript14020

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.50
Average class complexity167.50
▷ Minimum class complexity119.00
▷ Maximum class complexity216.00
Average method complexity4.74
▷ Minimum method complexity1.00
▷ Maximum method complexity92.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods89
▷ Static methods00.00%
▷ Public methods5764.04%
▷ Protected methods00.00%
▷ Private methods3235.96%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
There were not PNG files found in your plugin