78% humanid-spam-filter

Code Review | humanID – Anti-Spam Comment Filter || Stop junk comments & Protect your users' privacy. 100% open source.

WordPress plugin humanID – Anti-Spam Comment Filter || Stop junk comments & Protect your users' privacy. 100% open source. scored78%from 54 tests.

About plugin

  • Plugin page: humanid-spam-filter
  • Plugin version: 2.0.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-6.1
  • WordPress version: 6.3.1
  • First release: Sep 22, 2022
  • Latest release: Feb 28, 2023
  • Number of updates: 5
  • Update frequency: every 34.6 days
  • Top authors: humanid (80%)kofimokome (40%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /284 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.44MB] [CPU: ▲2.01ms] Passed 4 tests

A check of server-side resources used by humanID – Anti-Spam Comment Filter || Stop junk comments & Protect your users' privacy. 100% open source.
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.95 ▲0.4949.45 ▲5.95
Dashboard /wp-admin3.74 ▲0.4353.24 ▲0.15
Posts /wp-admin/edit.php3.79 ▲0.4351.85 ▼0.84
Add New Post /wp-admin/post-new.php6.34 ▲0.45102.43 ▲2.79
Media Library /wp-admin/upload.php3.66 ▲0.4342.79 ▲6.86

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

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

Browser metrics Passed 4 tests

Checking browser requirements for humanID – Anti-Spam Comment Filter || Stop junk comments & Protect your users' privacy. 100% open source.
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,967 ▲18113.79 ▼0.579.30 ▲7.0241.98 ▼2.26
Dashboard /wp-admin2,208 ▲315.70 ▲0.1285.58 ▼15.3376.48 ▲32.16
Posts /wp-admin/edit.php2,119 ▲191.95 ▼0.0034.18 ▼2.7435.30 ▼2.73
Add New Post /wp-admin/post-new.php1,543 ▲1523.10 ▲0.07758.07 ▲79.4959.01 ▲5.63
Media Library /wp-admin/upload.php1,419 ▲194.18 ▼0.06101.77 ▼15.4978.92 ▲32.08

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 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: 7 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • wp_hidsf__last_revision

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/humanid-spam-filter/humanid-spam-filter.php
  • 18× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'humanid_spam_filter\\Module' not found in wp-content/plugins/humanid-spam-filter/modules/contactform7/ContactForm7Module.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function humanid_spam_filter\\add_filter() in wp-content/plugins/humanid-spam-filter/models/includes.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function humanid_spam_filter\\add_filter() in wp-content/plugins/humanid-spam-filter/migrations/includes.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'humanid_spam_filter\\Module' not found in wp-content/plugins/humanid-spam-filter/modules/dashboard/DashboardModule.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/humanid-spam-filter/lib/includes.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function humanid_spam_filter\\admin_url() in wp-content/plugins/humanid-spam-filter/modules/dashboard/templates/index.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'humanid_spam_filter\\Module' not found in wp-content/plugins/humanid-spam-filter/modules/verification/VerificationModule.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'humanid_spam_filter\\Migration' not found in wp-content/plugins/humanid-spam-filter/migrations/users.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function humanid_spam_filter\\add_filter() in wp-content/plugins/humanid-spam-filter/modules/includes.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'humanid_spam_filter\\Model' not found in wp-content/plugins/humanid-spam-filter/models/User.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
7 plugin tags: contact form 7, human-id, spam protection, human id, contact-form-7...

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

"humanID – Anti-Spam Comment Filter || Stop junk comments & Protect your users' privacy. 100% open source." version 2.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Plugin Name: Keep the plugin name shorter than 70 characters (currently 107 characters long)

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
Good job! No executable or dangerous file extensions detected3,221 lines of code in 43 files:
LanguageFilesBlank linesComment linesLines of code
PHP304335531,885
Markdown41680816
Sass5463188
CSS1291177
JavaScript2137119
PO File16836

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity11.93
▷ Minimum class complexity1.00
▷ Maximum class complexity37.00
Average method complexity2.01
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes15
▷ Abstract classes00.00%
▷ Concrete classes15100.00%
▷ Final classes00.00%
Methods134
▷ Static methods4231.34%
▷ Public methods11787.31%
▷ Protected methods118.21%
▷ Private methods64.48%
Functions23
▷ Named functions834.78%
▷ Anonymous functions1565.22%
Constants15
▷ Global constants426.67%
▷ Class constants1173.33%
▷ Public constants11100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
13 PNG files occupy 1.55MB with 1.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/banner-772x250.png95.48KB45.43KB▼ 52.42%
assets/images/anonymous_login.png30.46KB13.92KB▼ 54.32%
assets/images/humanid_white.png3.81KB0.95KB▼ 75.11%
assets/screenshot-1.png297.03KB82.26KB▼ 72.31%
lib/wordpress_tools/images/img2.png56.13KB14.21KB▼ 74.69%