76% contact-forms-anti-spam

Code Review | Maspik - Spam blacklist

WordPress plugin Maspik - Spam blacklist scored 76% from 54 tests.

About plugin

  • Plugin page: contact-forms-ant...
  • Plugin version: 0.5.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-5.9
  • WordPress version: 5.9.2
  • First release: Feb 8, 2021
  • Latest release: Apr 5, 2022
  • Number of updates: 58
  • Update frequency: every 7.3 days
  • Top authors: yonifre (100%)

Code review

54 tests

User reviews

15 reviews

Install metrics

3,000+ active / 14,249 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.22MB] [CPU: ▼301.21ms] Passed 4 tests

An overview of server-side resources used by Maspik - Spam blacklist
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.78 ▲0.2674.83 ▲5.04
Dashboard /wp-admin3.66 ▲0.2542.55 ▲3.43
Posts /wp-admin/edit.php3.88 ▲0.2450.68 ▲1.07
Add New Post /wp-admin/post-new.php7.12 ▲0.15109.56 ▼1,211.20
Media Library /wp-admin/upload.php3.53 ▲0.2435.74 ▲1.86
Anti spam /wp-admin/admin.php?page=contact-forms-anti-spam3.5130.91

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 48 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Maspik - Spam blacklist: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,895 ▲14115.78 ▲0.2311.38 ▼5.593.85 ▲0.37
Dashboard /wp-admin2,988 ▲696.43 ▲0.07189.21 ▼2.53214.17 ▲18.20
Posts /wp-admin/edit.php2,737 ▲193.37 ▼0.0592.14 ▼9.59184.03 ▲3.73
Add New Post /wp-admin/post-new.php1,684 ▼1115.99 ▼2.43716.91 ▲78.41191.02 ▼15.92
Media Library /wp-admin/upload.php1,764 ▲345.74 ▲0.01196.81 ▼6.10248.20 ▲1.21
Anti spam /wp-admin/admin.php?page=contact-forms-anti-spam2,7973.6091.28223.26
Spam API /wp-admin/contact-forms-anti-spam-pro.php261.140.0426.18
Spam log /wp-admin/contact-forms-anti-spam-log.php261.140.5715.56

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Uninstaller ran successfully

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
  • 9 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=contact-forms-anti-spam
    • > Notice in wp-content/plugins/contact-forms-anti-spam/admin/class-efas-admin.php+675
    Trying to access array offset on value of type bool

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/contact-forms-anti-spam/public/partials/efas-public-display.php
  • 7× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/contact-forms-anti-spam/admin/partials/contact-forms-anti-spam-pro.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/contact-forms-anti-spam/includes/functions.php:422
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/contact-forms-anti-spam/includes/elementor-hooks.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/contact-forms-anti-spam/admin/partials/contact-forms-anti-spam-admin-display.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/contact-forms-anti-spam/license/license.php:44
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/contact-forms-anti-spam/admin/partials/contact-forms-anti-spam-log.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/contact-forms-anti-spam/includes/cf7-hooks.php:6

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
These are user-side errors you should fix
    • > GET request to /wp-admin/contact-forms-anti-spam-pro.php
    • > Network (severe)
    wp-admin/contact-forms-anti-spam-pro.php - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/contact-forms-anti-spam-log.php
    • > Network (severe)
    wp-admin/contact-forms-anti-spam-log.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 81% 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:
  • Screenshots: These screenshots need descriptions #3, #4, #5, #6 in contact-forms-anti-spam/assets to your readme.txt
  • Donate link: Invalid URI ("")
  • Tags: Please reduce the number of tags, currently 17 tag instead of maximum 10
Please take inspiration from this readme.txt

contact-forms-anti-spam/contact-forms-anti-spam.php Passed 13 tests

The principal PHP file in "Maspik - Spam blacklist" v. 0.5.5 is loaded by WordPress automatically on each request
96 characters long description:
Eliminate spam on Elementor + CF7 Forms. Block specific words, IP, country, languages, and more!

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 plugin4,176 lines of code in 34 files:
LanguageFilesBlank linesComment linesLines of code
PHP257112,2633,208
Markdown2800341
PO File187112321
CSS3625275
JSON10025
JavaScript24546

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity17.73
▷ Minimum class complexity1.00
▷ Maximum class complexity156.00
Average method complexity2.60
▷ Minimum method complexity1.00
▷ Maximum method complexity41.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes15
▷ Abstract classes00.00%
▷ Concrete classes15100.00%
▷ Final classes16.67%
Methods157
▷ Static methods31.91%
▷ Public methods11774.52%
▷ Protected methods1811.46%
▷ Private methods2214.01%
Functions36
▷ Named functions3083.33%
▷ Anonymous functions616.67%
Constants9
▷ Global constants111.11%
▷ Class constants888.89%
▷ Public constants8100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
5 PNG files occupy 0.21MB with 0.10MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
license/tws-license-manager-client-master/Screenshots/status-not-active.png61.36KB23.15KB▼ 62.28%
license/tws-license-manager-client-master/Screenshots/status-inactive.png47.34KB20.04KB▼ 57.67%
license/tws-license-manager-client-master/Screenshots/status-active.png47.60KB20.04KB▼ 57.89%
license/tws-license-manager-client-master/Screenshots/status-expired.png50.15KB21.38KB▼ 57.36%
license/tws-license-manager-client-master/Assets/logo.png3.65KB2.93KB▼ 19.67%