84% block-domain-email-addresses-for-contact-form-7

Code Review | Block domain email addresses for Contact Form 7

WordPress plugin Block domain email addresses for Contact Form 7 scored 84% from 54 tests.

About plugin

  • Plugin page: block-domain-emai...
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.1-6.3
  • WordPress version: 6.3.1
  • First release: Sep 2, 2020
  • Latest release: Sep 23, 2023
  • Number of updates: 17
  • Update frequency: every 65.7 days
  • Top authors: apasionados (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active / 2,170 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.00MB] [CPU: ▼2.87ms] Passed 4 tests

An overview of server-side resources used by Block domain email addresses for Contact Form 7
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.65 ▼5.80
Dashboard /wp-admin3.31 ▲0.0144.83 ▼5.20
Posts /wp-admin/edit.php3.36 ▲0.0048.14 ▲1.61
Add New Post /wp-admin/post-new.php5.89 ▲0.0084.96 ▼1.36
Media Library /wp-admin/upload.php3.23 ▲0.0034.71 ▲0.90

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Block domain email addresses for Contact Form 7
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.66 ▼0.721.77 ▼0.0843.49 ▼0.22
Dashboard /wp-admin2,203 ▲185.83 ▼0.2696.06 ▼10.0238.37 ▼8.51
Posts /wp-admin/edit.php2,092 ▲32.02 ▼0.0539.88 ▲0.1934.23 ▲1.55
Add New Post /wp-admin/post-new.php1,528 ▼1518.66 ▲0.39617.67 ▲25.1349.52 ▼16.27
Media Library /wp-admin/upload.php1,388 ▼04.18 ▼0.0695.31 ▼2.5640.77 ▼4.34

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded

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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/block-domain-email-addresses-for-contact-form-7/block-domain-email-addresses-for-contact-form-7.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
5 plugin tags: contact form, block email, email, contact, form

block-domain-email-addresses-for-contact-form-7/block-domain-email-addresses-for-contact-form-7.php Passed 13 tests

The principal PHP file in "Block domain email addresses for Contact Form 7" v. 1.0.1 is loaded by WordPress automatically on each request
125 characters long description:
Blocks spammers sending contact forms using an email address from the domain of the WordPress installation in Contact Form 7.

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
Success! There were no dangerous files found in this plugin61 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PO File12231
PHP121530

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.29
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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin