78% block-email-cf7

Code Review | Contact Form 7 - Blacklist Unwanted Email

WordPress plugin Contact Form 7 - Blacklist Unwanted Email scored78%from 54 tests.

About plugin

  • Plugin page: block-email-cf7
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-5.3
  • WordPress version: 6.3.1
  • First release: Jun 12, 2019
  • Latest release: Oct 15, 2019
  • Number of updates: 10
  • Update frequency: every 17.9 days
  • Top authors: abahalkar (100%)

Code review

54 tests

User reviews

1 review

Install metrics

800+ active /4,142 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
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼5.81ms] Passed 4 tests

This is a short check of server-side resources used by Contact Form 7 - Blacklist Unwanted Email
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0140.46 ▼3.44
Dashboard /wp-admin3.32 ▲0.0151.92 ▼4.61
Posts /wp-admin/edit.php3.37 ▲0.0153.30 ▼1.52
Add New Post /wp-admin/post-new.php5.90 ▲0.0190.24 ▼13.67
Media Library /wp-admin/upload.php3.24 ▲0.0136.82 ▼1.23

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 19 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Contact Form 7 - Blacklist Unwanted Email
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.72 ▲0.441.64 ▼0.3640.92 ▲0.80
Dashboard /wp-admin2,198 ▲245.66 ▲0.0892.28 ▼8.8239.34 ▼1.74
Posts /wp-admin/edit.php2,103 ▼02.00 ▲0.0042.80 ▼3.2736.84 ▼2.79
Add New Post /wp-admin/post-new.php1,526 ▼223.07 ▼0.08623.64 ▼27.3652.70 ▼21.41
Media Library /wp-admin/upload.php1,400 ▼04.27 ▲0.04102.95 ▼4.1444.12 ▼2.96

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 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
Please fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/block-email-cf7/block-email-cf7.php
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/block-email-cf7/inc/settings.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/block-email-cf7/inc/activation.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Tags: Please delete some tags, you are using 17 tag instead of maximum 10
You can look at the official readme.txt

block-email-cf7/block-email-cf7.php 92% from 13 tests

The main PHP file in "Contact Form 7 - Blacklist Unwanted Email" ver. 1.1.0 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Description: Keep the plugin description shorter than 140 characters (currently 170 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin220 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP96252203
CSS11017

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions17
▷ Named functions17100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
5 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/block-email-cf7.png0.70KB0.73KB0.00%
img/block-email-cf7-icon.png0.92KB0.98KB0.00%
img/block-email-color.png0.68KB0.35KB▼ 48.21%
img/block-email-icon.png1.15KB1.31KB0.00%
img/block-email.png2.78KB1.61KB▼ 42.28%