84% cf7-add-password-field

Code Review | Contact Form 7 Add Password field

WordPress plugin Contact Form 7 Add Password field scored84%from 54 tests.

About plugin

  • Plugin page: cf7-add-password-...
  • Plugin version: 4.1
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.2-6.3
  • WordPress version: 6.3.1
  • First release: May 18, 2018
  • Latest release: Aug 20, 2023
  • Number of updates: 34
  • Update frequency: every 56.5 days
  • Top authors: kimipooh (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

4,000+ active /35,258 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼9.70ms] Passed 4 tests

Server-side resources used by Contact Form 7 Add Password field
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0740.69 ▼1.46
Dashboard /wp-admin3.37 ▲0.0252.88 ▼13.48
Posts /wp-admin/edit.php3.42 ▲0.0650.55 ▲3.29
Add New Post /wp-admin/post-new.php5.95 ▲0.0685.15 ▼20.64
Media Library /wp-admin/upload.php3.30 ▲0.0633.45 ▼3.20

Server storage [IO: ▲3.32MB] [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: 20 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Contact Form 7 Add Password field
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.20 ▼0.091.93 ▲0.0543.45 ▼0.71
Dashboard /wp-admin2,198 ▲185.52 ▼0.0997.03 ▲3.4944.05 ▲7.28
Posts /wp-admin/edit.php2,103 ▲32.02 ▼0.0336.39 ▼0.5034.74 ▼0.89
Add New Post /wp-admin/post-new.php1,549 ▲2323.02 ▼0.77675.17 ▲38.3957.08 ▼18.86
Media Library /wp-admin/upload.php1,403 ▼04.25 ▼0.0196.84 ▼3.9844.76 ▼1.92

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • 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
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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
Almost there! Just fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/cf7-add-password-field/modules/password.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/cf7-add-password-field/modules/password.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
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
1 plugin tags: contact form

cf7-add-password-field/cf7-add-password-field.php 92% from 13 tests

The entry point to "Contact Form 7 Add Password field" version 4.1 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Domain Path: The domain path points to a folder that does not exist ("/languages")

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
Everything looks great! No dangerous files found in this plugin15,282 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
SVG3009,552
CSS12,53275,431
PHP24920288
JavaScript10011

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
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%
Functions7
▷ Named functions7100.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
There are no PNG files in this plugin