83% contact-form-7-accessible-defaults

Code Review | Contact Form 7: Accessible Defaults

WordPress plugin Contact Form 7: Accessible Defaults scored83%from 54 tests.

About plugin

  • Plugin page: contact-form-7-ac...
  • Plugin version: 1.1.8
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-6.4
  • WordPress version: 6.3.1
  • First release: Mar 14, 2015
  • Latest release: Nov 16, 2023
  • Number of updates: 31
  • Update frequency: every 102.2 days
  • Top authors: joedolson (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

6,000+ active /41,370 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by Contact Form 7: Accessible Defaults
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0639.75 ▼2.37
Dashboard /wp-admin3.37 ▲0.0244.66 ▼15.74
Posts /wp-admin/edit.php3.42 ▲0.0647.86 ▲1.02
Add New Post /wp-admin/post-new.php5.97 ▲0.0887.58 ▼10.15
Media Library /wp-admin/upload.php3.29 ▲0.0635.26 ▲1.78

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Contact Form 7: Accessible Defaults
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,822 ▲7514.34 ▼0.021.97 ▲0.1738.85 ▼5.96
Dashboard /wp-admin2,202 ▲255.64 ▲0.0498.06 ▲5.7042.71 ▼1.63
Posts /wp-admin/edit.php2,107 ▲101.99 ▼0.0836.96 ▲0.5331.35 ▲0.68
Add New Post /wp-admin/post-new.php1,533 ▲1623.11 ▲4.20694.35 ▲178.5052.35 ▼1.41
Media Library /wp-admin/upload.php1,410 ▲104.19 ▲0.03103.65 ▼1.1141.63 ▼4.60

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
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • 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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 1× 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/contact-form-7-accessible-defaults/contact-form-7-accessible-form.php:46

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 86% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
6 plugin tags: accessibility, wpcf7, contact forms, contact form 7, wcag...

contact-form-7-accessible-defaults/contact-form-7-accessible-form.php 69% from 13 tests

The main PHP script in "Contact Form 7: Accessible Defaults" version 1.1.8 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("contact-form-7-accessible-defaults.php" instead of "contact-form-7-accessible-form.php")
  • Domain Path: The domain path should be prefixed with a forward slash character ("/lang")
  • Domain Path: Note that the domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("lang")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

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
Good job! No executable or dangerous file extensions detected213 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP11485200
JavaScript1007
CSS1206

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.39
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%
Functions6
▷ Named functions6100.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
No PNG images were found in this plugin