10% form-to-mail

Code Review | Form to mail

WordPress plugin Form to mail scored 10% from 54 tests.

About plugin

  • Plugin page: form-to-mail
  • Plugin version: 2.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7.5-4.7.5
  • WordPress version: 6.3.1
  • First release: May 26, 2017
  • Latest release: Jun 5, 2017
  • Number of updates: 5
  • Update frequency: every 9.2 days
  • Top authors: Karabov (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 934 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Please fix the following installer errors
  • The plugin cannot be installed
    • > User deprecated in wp-includes/functions.php+5643
    File class-phpmailer.php is deprecated since version 5.5.0! Use wp-includes/PHPMailer/PHPMailer.php instead. The PHPMailer class has been moved to wp-includes/PHPMailer subdirectory and now uses the PHPMailer\PHPMailer namespace.

Server metrics [RAM: ▼1.88MB] [CPU: ▼55.51ms] Passed 4 tests

Server-side resources used by Form to mail
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.10 ▼1.364.65 ▼35.72
Dashboard /wp-admin2.12 ▼1.185.90 ▼44.50
Posts /wp-admin/edit.php2.12 ▼1.238.06 ▼38.23
Add New Post /wp-admin/post-new.php2.12 ▼3.766.12 ▼103.58
Media Library /wp-admin/upload.php2.12 ▼1.115.68 ▼26.49
Настройка /wp-admin/edit.php?post_type=ftm_form&page=ftm_settings2.126.34
Новая форма /wp-admin/post-new.php?post_type=ftm_form2.126.32
Формы /wp-admin/edit.php?post_type=ftm_form2.127.22

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

Browser metrics Passed 4 tests

A check of browser resources used by Form to mail
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,837 ▲10213.28 ▼1.474.74 ▲3.0939.67 ▼5.90
Dashboard /wp-admin2,237 ▲524.90 ▼0.9799.54 ▼10.9639.06 ▼2.99
Posts /wp-admin/edit.php2,123 ▲342.06 ▲0.0240.37 ▲0.7538.94 ▲1.77
Add New Post /wp-admin/post-new.php1,545 ▲2323.00 ▼0.38638.18 ▼47.7569.68 ▲9.77
Media Library /wp-admin/upload.php1,416 ▲254.25 ▲0.04103.12 ▼0.5744.93 ▼1.20
Настройка /wp-admin/edit.php?post_type=ftm_form&page=ftm_settings8902.0723.7728.90
Новая форма /wp-admin/post-new.php?post_type=ftm_form2,1986.53131.5862.71
Формы /wp-admin/edit.php?post_type=ftm_form1,0842.0230.0728.36

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin did not uninstall without warnings or errors
    • > User deprecated in wp-includes/functions.php+5643
    File class-phpmailer.php is deprecated since version 5.5.0! Use wp-includes/PHPMailer/PHPMailer.php instead. The PHPMailer class has been moved to wp-includes/PHPMailer subdirectory and now uses the PHPMailer\PHPMailer namespace.
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=ftm_form
    • > POST request to /wp-admin/admin-ajax.php
    • > User deprecated in wp-includes/functions.php+5643
    File class-phpmailer.php is deprecated since version 5.5.0! Use wp-includes/PHPMailer/PHPMailer.php instead. The PHPMailer class has been moved to wp-includes/PHPMailer subdirectory and now uses the PHPMailer\PHPMailer namespace.
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=ftm_form
    • > POST request to /wp-admin/admin-ajax.php
    • > User deprecated in wp-includes/functions.php+5643
    File class-smtp.php is deprecated since version 5.5.0! Use wp-includes/PHPMailer/SMTP.php instead. The SMTP class has been moved to the wp-includes/PHPMailer subdirectory and now uses the PHPMailer\PHPMailer namespace.
    • > GET request to /wp-admin/edit.php?post_type=ftm_form&page=ftm_settings
    • > Notice in wp-content/plugins/form-to-mail/admin/settings.php+7
    Undefined index: ftm_settings_tab
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=ftm_form
    • > Notice in wp-content/plugins/form-to-mail/admin/contentbox.php+54
    Undefined index: label
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=ftm_form
    • > Notice in wp-content/plugins/form-to-mail/admin/contentbox.php+57
    Undefined index: name
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=ftm_form
    • > Notice in wp-content/plugins/form-to-mail/admin/contentbox.php+64
    Undefined index: type
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=ftm_form
    • > Notice in wp-content/plugins/form-to-mail/admin/contentbox.php+70
    Undefined index: required

SRP 50% 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
The following issues need your attention
  • 13× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/form-to-mail/posttype.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/form-to-mail/form/js.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/form-to-mail/admin/settings-general.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/form-to-mail/form/submitform.php:2
    • > PHP Warning
      require_once(ABSPATHWPINC/class-phpmailer.php): failed to open stream: No such file or directory in wp-content/plugins/form-to-mail/form/ftmSubmit.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/form-to-mail/posttype.php:3
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/form-to-mail/form/ftmSubmit.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/form-to-mail/admin/settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/form-to-mail/admin/settings-callback.php:2
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHWPINC/class-phpmailer.php' (include_path='.:/usr/share/php') in wp-content/plugins/form-to-mail/form/ftmSubmit.php on line 2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues 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
6 plugin tags: form, feedback, contact, contact form, email...

form-to-mail/form-to-mail.php Passed 13 tests

The primary PHP file in "Form to mail" version 2.0.0 is used by WordPress to initiate all plugin functionality
43 characters long description:
Отправка формы на почту

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected798 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP145979798

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity27.00
▷ Minimum class complexity15.00
▷ Maximum class complexity39.00
Average method complexity4.06
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods1058.82%
▷ Protected methods00.00%
▷ Private methods741.18%
Functions28
▷ Named functions28100.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