90% cf7-domain-blacklist

Code Review | Contact Form 7 Domain Blacklist

WordPress plugin Contact Form 7 Domain Blacklist scored90%from 54 tests.

About plugin

  • Plugin page: cf7-domain-blacklist
  • Plugin version: 1.1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.4.2
  • WordPress version: 6.3.1
  • First release: Sep 5, 2017
  • Latest release: Jun 25, 2020
  • Number of updates: 16
  • Update frequency: every 64.0 days
  • Top authors: ademirdiniz (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /2,388 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by Contact Form 7 Domain Blacklist
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0041.15 ▲3.61
Dashboard /wp-admin3.31 ▼0.0447.94 ▼8.21
Posts /wp-admin/edit.php3.36 ▲0.0044.94 ▼1.10
Add New Post /wp-admin/post-new.php5.89 ▲0.0088.17 ▼9.48
Media Library /wp-admin/upload.php3.23 ▲0.0036.34 ▲2.42

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Contact Form 7 Domain Blacklist
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.78 ▲0.181.81 ▼0.0944.16 ▲3.13
Dashboard /wp-admin2,203 ▲115.77 ▼0.1693.93 ▼12.8939.14 ▲0.60
Posts /wp-admin/edit.php2,092 ▲32.05 ▲0.0439.80 ▲5.5634.22 ▼2.99
Add New Post /wp-admin/post-new.php1,542 ▲2318.31 ▼5.05644.44 ▼47.5755.58 ▼13.74
Media Library /wp-admin/upload.php1,382 ▼64.21 ▼0.0295.06 ▼15.5441.37 ▼4.94

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
No output text or server-side errors detected 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
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Plugin Name: You should set the name of your plugin on the first line ( === cf7-domain-blacklist === )
You can take inspiration from this readme.txt

cf7-domain-blacklist/cf7-domain-blacklist.php Passed 13 tests

The main PHP script in "Contact Form 7 Domain Blacklist" version 1.1.3 is automatically included on every request by WordPress
83 characters long description:
Create a blacklist of prohibited domains integrated with the Contact Form 7 plugin.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected10,533 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
CSS34197,555
SVG1002,671
PHP7229165
JavaScript3101385
PO File117257

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.25
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%
Functions9
▷ Named functions888.89%
▷ Anonymous functions111.11%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin