74% form-forms

Code Review | Form - Contact Form

WordPress plugin Form - Contact Form scored74%from 54 tests.

About plugin

  • Plugin page: form-forms
  • Plugin version: 1.2.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-6.0
  • WordPress version: 6.3.1
  • First release: Nov 10, 2016
  • Latest release: Jul 6, 2022
  • Number of updates: 64
  • Update frequency: every 32.3 days
  • Top authors: richteam (100%)

Code review

54 tests

User reviews

20 reviews

Install metrics

200+ active /22,597 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.75MB] [CPU: ▲4.20ms] Passed 4 tests

Server-side resources used by Form - Contact Form
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.21 ▲0.7551.34 ▲11.36
Dashboard /wp-admin4.05 ▲0.7547.15 ▲0.27
Posts /wp-admin/edit.php4.17 ▲0.8154.44 ▲8.12
Add New Post /wp-admin/post-new.php6.65 ▲0.7798.70 ▲3.84
Media Library /wp-admin/upload.php3.97 ▲0.7538.72 ▲4.55

Server storage [IO: ▲4.24MB] [DB: ▲0.04MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 385 new files
Database: 12 new tables, 7 new options
New tables
wp_rich_web_forms_themes2
wp_rich_web_forms_fields
wp_rich_web_forms_mails
wp_rich_web_forms_themes1
wp_rich_web_forms_options
wp_rich_web_forms_saved
wp_rich_web_forms_cust_id
wp_rich_web_forms_id
wp_rich_web_forms_themes3
wp_rich_web_forms_manager
...
New WordPress options
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_rich_web_forms
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Form - Contact Form
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,039 ▲30416.78 ▲2.199.57 ▲7.5842.57 ▼6.14
Dashboard /wp-admin2,314 ▲1236.47 ▲1.62133.75 ▲29.3277.27 ▲29.95
Posts /wp-admin/edit.php2,201 ▲1123.19 ▲1.2168.38 ▲27.9838.53 ▲5.74
Add New Post /wp-admin/post-new.php1,580 ▲6624.09 ▲6.55670.17 ▼2.7240.26 ▼11.84
Media Library /wp-admin/upload.php1,496 ▲1114.98 ▲0.78125.18 ▲29.0244.37 ▲3.42
General Options /wp-admin/admin.php?page=Rich-Web Forms General1,3162.8258.3434.20
Submissions /wp-admin/admin.php?page=Rich-Web Forms Submissions1,0912.9252.4329.19
Messages Manager /wp-admin/admin.php?page=Rich-Web Forms Messages1,3994.82109.9762.94
Forms Manager /wp-admin/admin.php?page=Rich-Web Forms Admin3,0642.9256.7331.11
Forms Themes /wp-admin/admin.php?page=Rich-Web Forms Themes4,0992.8853.7426.07
Our Products /wp-admin/admin.php?page=Rich-Web Forms Products1,0522.9451.0545.79

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie tables were found after uninstall: 12 tables
    • wp_rich_web_forms_cust_id
    • wp_rich_web_forms_fields
    • wp_rich_web_forms_manager
    • wp_rich_web_forms_mails
    • wp_rich_web_forms_themes3
    • wp_rich_web_forms_saved
    • wp_rich_web_forms_themes2
    • wp_rich_web_forms_themes1
    • wp_rich_web_font_family
    • wp_rich_web_forms_options
    • ...
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-comments
    • widget_rich_web_forms
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% 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 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
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/form-forms/Rich-Web-Forms-Shortcode.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/form-forms/Rich-Web-Forms-Ajax.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/form-forms/Rich-Web-Forms-Widget.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/form-forms/Form.php:12

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

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
8 plugin tags: form builder, forms builder, contact form, email, form...

form-forms/Form.php 92% from 13 tests

The primary PHP file in "Form - Contact Form" version 1.2.4 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("form-forms.php" instead of "Form.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin13,066 lines of code in 91 files:
LanguageFilesBlank linesComment linesLines of code
CSS18608794,997
PHP1285334,938
JavaScript58164612,252
SVG300879

PHP code 50% from 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
It is recommended to fix the following
  • Method cyclomatic complexity should be reduced to less than 100 (currently 198)
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity199.00
▷ Minimum class complexity199.00
▷ Maximum class complexity199.00
Average method complexity67.00
▷ Minimum method complexity1.00
▷ Maximum method complexity198.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions34
▷ Named functions34100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
259 compressed PNG files occupy 0.51MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
Images/Flags/CH.png0.12KB0.12KB0.00%
Images/Flags/AZ.png0.40KB0.41KB0.00%
Images/Flags/ME.png0.62KB0.67KB0.00%
Images/Flags/IT.png0.12KB0.12KB▼ 4.07%
Images/Flags/MQ.png0.30KB0.28KB▼ 5.26%