78% simple-contact-forms

Code Review | Simple Contact Forms

WordPress plugin Simple Contact Forms scored78%from 54 tests.

About plugin

  • Plugin page: simple-contact-forms
  • Plugin version: 1.6.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.6.1
  • WordPress version: 6.3.1
  • First release: Jul 8, 2015
  • Latest release: Oct 3, 2016
  • Number of updates: 88
  • Update frequency: every 5.5 days
  • Top authors: owenr88 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /3,901 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 successfully, without throwing any errors or notices

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

Analyzing server-side resources used by Simple Contact Forms
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0843.16 ▲1.38
Dashboard /wp-admin3.34 ▲0.0450.21 ▼4.80
Posts /wp-admin/edit.php3.46 ▲0.1048.40 ▼3.65
Add New Post /wp-admin/post-new.php5.95 ▲0.0686.54 ▼14.27
Media Library /wp-admin/upload.php3.27 ▲0.0439.81 ▲3.34
Simple Contact Forms /wp-admin/options-general.php?page=simple-contact-forms3.3574.20

Server storage [IO: ▲0.14MB] [DB: ▲0.07MB] Passed 3 tests

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 40 new files
Database: 1 new table, 31 new options
New tables
wp_scf_completions
New WordPress options
scf_recaptcha_public
scf_form_styling
scf_valid_fail_text
scf_recaptcha_private
scf_form_title
db_upgraded
scf_db_version
scf_button_class
scf_success_msg
scf_validation
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Simple Contact Forms
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,899 ▲13813.72 ▼0.468.73 ▲6.7944.17 ▲0.76
Dashboard /wp-admin2,194 ▲145.70 ▲0.1694.56 ▼7.3344.02 ▼1.57
Posts /wp-admin/edit.php2,106 ▲92.31 ▲0.3438.39 ▲0.5234.72 ▼1.20
Add New Post /wp-admin/post-new.php1,532 ▲623.13 ▲5.46653.33 ▼6.5937.20 ▼21.34
Media Library /wp-admin/upload.php1,399 ▲54.23 ▲0.01102.93 ▲0.8145.46 ▲3.46
Simple Contact Forms /wp-admin/options-general.php?page=simple-contact-forms2,0627.00148.5471.95

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_scf_widget
    • db_upgraded
    • widget_recent-posts

Smoke tests 50% from 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)
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
Please take a closer look at the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/simple-contact-forms/admin/views/admin-page-settings.php
  • 54× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/simple-contact-forms/admin/views/admin-page-settings.php on line 160
    • > PHP Notice
      Undefined variable: vals in wp-content/plugins/simple-contact-forms/admin/views/admin-page-settings.php on line 130
    • > PHP Notice
      Undefined variable: vals in wp-content/plugins/simple-contact-forms/admin/views/admin-page-settings.php on line 120
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/simple-contact-forms/admin/views/admin-page-settings.php on line 136
    • > PHP Notice
      Undefined variable: vals in wp-content/plugins/simple-contact-forms/admin/views/admin-page-settings.php on line 125
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/simple-contact-forms/admin/views/admin-page-settings.php on line 138
    • > PHP Notice
      Undefined variable: vals in wp-content/plugins/simple-contact-forms/admin/views/admin-page-settings.php on line 92
    • > PHP Notice
      Undefined variable: vals in wp-content/plugins/simple-contact-forms/admin/views/admin-page-settings.php on line 136
    • > PHP Notice
      Undefined variable: vals in wp-content/plugins/simple-contact-forms/admin/views/admin-page-settings.php on line 50
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/simple-contact-forms/admin/views/admin-page-settings.php on line 114

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 96% 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
4 plugin tags: contact, enquiry forms, contact forms, forms

simple-contact-forms/simple-contact-forms.php 92% from 13 tests

The main PHP file in "Simple Contact Forms" ver. 1.6.4 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Git Repository: Please remove the Git repository from this plugin

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin2,044 lines of code in 34 files:
LanguageFilesBlank linesComment linesLines of code
PHP278501,1291,527
JavaScript35277267
Markdown1540137
CSS221997
JSON10016

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity11.55
▷ Minimum class complexity1.00
▷ Maximum class complexity43.00
Average method complexity3.32
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes20
▷ Abstract classes00.00%
▷ Concrete classes20100.00%
▷ Final classes00.00%
Methods91
▷ Static methods66.59%
▷ Public methods7885.71%
▷ Protected methods00.00%
▷ Private methods1314.29%
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected