10% contact-form-redux

Code Review | Contact Form Redux

WordPress plugin Contact Form Redux scored10%from 54 tests.

About plugin

  • Plugin page: contact-form-redux
  • Plugin version: 1.3.7
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Jan 1, 2019
  • Latest release: Nov 9, 2023
  • Number of updates: 51
  • Update frequency: every 34.8 days
  • Top authors: linux4me2 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,893 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
You still need to fix the following installer errors
  • The plugin did not install without errors
    • > Compile error in wp-content/plugins/contact-form-redux/includes/form-tag.php+391
    Declaration of CFREDUX_FormTag::offsetExists(mixed $offset): bool must be compatible with ArrayAccess::offsetExists($offset)

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

This is a short check of server-side resources used by Contact Form Redux
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0035.19 ▼5.32
Dashboard /wp-admin3.31 ▲0.0045.19 ▼6.67
Posts /wp-admin/edit.php3.36 ▲0.0048.71 ▲1.82
Add New Post /wp-admin/post-new.php5.89 ▲0.0082.24 ▼6.71
Media Library /wp-admin/upload.php3.23 ▲0.0032.43 ▼3.08

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Contact Form Redux
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲2814.67 ▲0.781.89 ▲0.1640.43 ▼3.68
Dashboard /wp-admin2,192 ▲125.56 ▼0.0886.98 ▼10.7138.21 ▼7.66
Posts /wp-admin/edit.php2,100 ▲31.96 ▼0.0138.66 ▲1.9434.72 ▲1.92
Add New Post /wp-admin/post-new.php1,531 ▲522.86 ▼0.43624.06 ▼49.1352.43 ▼5.92
Media Library /wp-admin/upload.php1,403 ▲34.24 ▲0.0595.45 ▼2.7341.80 ▲0.10

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
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/contact-form-redux/admin/edit-contact-form.php
  • 34× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/contact-form-redux/includes/rest-api.php:3
    • > PHP Fatal error
      Declaration of CFREDUX_FormTag::offsetExists(mixed $offset): bool must be compatible with ArrayAccess::offsetExists($offset) in wp-content/plugins/contact-form-redux/includes/form-tag.php on line 391
    • > PHP Fatal error
      Declaration of CFREDUX_Validation::offsetExists(mixed $offset): bool must be compatible with ArrayAccess::offsetExists($offset) in wp-content/plugins/contact-form-redux/includes/validation.php on line 82
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/contact-form-redux/modules/acceptance.php:8
    • > PHP Warning
      include_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/contact-form-redux/admin/includes/class-contact-forms-list-table.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/contact-form-redux/modules/count.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/contact-form-redux/modules/textarea.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/contact-form-redux/modules/select.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/contact-form-redux/modules/number.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/contact-form-redux/admin/includes/welcome-panel.php:101

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
8 plugin tags: ajax, contact form, contact, akismet, google recaptcha...

contact-form-redux/contact-form-redux.php Passed 13 tests

The primary PHP file in "Contact Form Redux" version 1.3.7 is used by WordPress to initiate all plugin functionality
35 characters long description:
A simple but flexible contact form.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin13,161 lines of code in 59 files:
LanguageFilesBlank linesComment linesLines of code
PHP452,36825211,589
JavaScript6212871,052
CSS810651520

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity27.90
▷ Minimum class complexity1.00
▷ Maximum class complexity102.00
Average method complexity3.26
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes20
▷ Abstract classes15.00%
▷ Concrete classes1995.00%
▷ Final classes00.00%
Methods240
▷ Static methods2711.25%
▷ Public methods20384.58%
▷ Protected methods10.42%
▷ Private methods3615.00%
Functions222
▷ Named functions21596.85%
▷ Anonymous functions73.15%
Constants30
▷ Global constants1756.67%
▷ Class constants1343.33%
▷ Public constants13100.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
There were not PNG files found in your plugin