62% multi-purpose-mail-form

Code Review | Multi Purpose Mail Form

WordPress plugin Multi Purpose Mail Form scored62%from 54 tests.

About plugin

  • Plugin page: multi-purpose-mai...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-4.7.3
  • WordPress version: 6.3.1
  • First release: May 11, 2013
  • Latest release: Mar 10, 2017
  • Number of updates: 35
  • Update frequency: every 49.9 days
  • Top authors: mahlamusa (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

20+ active /6,247 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.30MB] [CPU: ▼6.93ms] Passed 4 tests

Analyzing server-side resources used by Multi Purpose Mail Form
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.75 ▲0.2945.86 ▲2.80
Dashboard /wp-admin3.60 ▲0.2949.93 ▼7.50
Posts /wp-admin/edit.php3.71 ▲0.3544.85 ▼10.48
Add New Post /wp-admin/post-new.php6.20 ▲0.3185.80 ▼10.18
Media Library /wp-admin/upload.php3.52 ▲0.2937.48 ▲0.44
MPMF /wp-admin/admin.php?page=mpmf-forms3.6336.96
Received /wp-admin/admin.php?page=mpmf-received3.5335.72
Help /wp-admin/admin.php?page=mpmf-help3.5045.83
Settings /wp-admin/admin.php?page=mpmf-settings3.6330.07

Server storage [IO: ▲0.62MB] [DB: ▲0.01MB] Passed 3 tests

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 37 new files
Database: 4 new tables, 11 new options
New tables
wp_mpmf_field_options
wp_mpmf_form_fields
wp_mpmf_forms
wp_mpmf_messages
New WordPress options
widget_theysaidso_widget
mpmf_phone_us
mpmf_email_options
mpmf_recaptcha_settings
widget_recent-posts
mpmf_email_to_us
theysaidso_admin_options
can_compress_scripts
mpmf_installed
db_upgraded
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Multi Purpose Mail Form
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,939 ▲17813.52 ▼0.838.43 ▲6.5938.61 ▼4.14
Dashboard /wp-admin2,240 ▲634.81 ▼0.7790.73 ▼12.9840.15 ▼5.06
Posts /wp-admin/edit.php2,142 ▲422.22 ▲0.2035.26 ▼1.5335.30 ▼0.51
Add New Post /wp-admin/post-new.php1,715 ▲18922.32 ▼1.44609.25 ▼86.5838.77 ▼17.24
Media Library /wp-admin/upload.php1,436 ▲364.32 ▲0.05101.27 ▼2.7045.49 ▼3.37
MPMF /wp-admin/admin.php?page=mpmf-forms8701.7327.0334.44
Received /wp-admin/admin.php?page=mpmf-received1,0421.8926.8632.81
Help /wp-admin/admin.php?page=mpmf-help1,0801.9030.6456.28
Settings /wp-admin/admin.php?page=mpmf-settings1,8871.7827.1631.01

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie tables detected upon uninstall: 4 tables
    • wp_mpmf_form_fields
    • wp_mpmf_messages
    • wp_mpmf_field_options
    • wp_mpmf_forms
  • The uninstall procedure has failed, leaving 11 options in the database
    • mpmf_installed
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • mpmf_phone_us
    • can_compress_scripts
    • mpmf_email_options
    • theysaidso_admin_options
    • mpmf_email_to_us
    • widget_recent-posts
    • ...

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Please fix the following server-side errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mpmf-settings
    • > Notice in wp-content/plugins/multi-purpose-mail-form/admin/partials/multi-purpose-mail-form-admin-settings.php+275
    Undefined index: mpmf_show_captcha
    • > GET request to /wp-admin/admin.php?page=mpmf-settings
    • > Notice in wp-content/plugins/multi-purpose-mail-form/admin/partials/multi-purpose-mail-form-admin-settings.php+477
    Undefined index: mpmf_autoresponder_subject
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mpmf-settings
    • > Notice in wp-content/plugins/multi-purpose-mail-form/admin/partials/multi-purpose-mail-form-admin-settings.php+502
    Undefined index: mpmf_default_subject

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/multi-purpose-mail-form/public/partials/multi-purpose-mail-form-public-display.php
  • 7× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'Multi_Purpose_Mail_Form_Admin' not found in wp-content/plugins/multi-purpose-mail-form/admin/partials/multi-purpose-mail-form-admin-display.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/multi-purpose-mail-form/admin/partials/multi-purpose-mail-form-admin-settings.php:79
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/multi-purpose-mail-form/admin/partials/multi-purpose-mail-form-admin-view-submissions.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/multi-purpose-mail-form/admin/partials/multi-purpose-mail-form-admin-help.php:39
    • > PHP Fatal error
      Uncaught Error: Class 'Multi_Purpose_Mail_Form_Admin' not found in wp-content/plugins/multi-purpose-mail-form/admin/partials/multi-purpose-mail-form-admin-input-buttons.php:16
    • > PHP Fatal error
      Uncaught Error: Call to a member function field_modal() on null in wp-content/plugins/multi-purpose-mail-form/admin/partials/multi-purpose-mail-form-admin-payment-input-buttons.php:15
    • > PHP Notice
      Undefined variable: admin in wp-content/plugins/multi-purpose-mail-form/admin/partials/multi-purpose-mail-form-admin-payment-input-buttons.php on line 15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (screenshot1.png - Shows the main menu and the main page of the plugin where you can create forms.), #2 (screenshot2.png - Form Preview and form design screen. This is where you build your form by adding your fields), #3 (screenshot3.png - Adding or customizing a form field with multiple options), #4 (screenshot3.png - Default form on the frontend), #5 (screenshot5.png - Custom form displayed in web page), #6 (screenshot6.png - Plugin Settings screen), #7 (screenshot7.png - Received data. Shows the data that was sent from the custome forms. You can now see the data right in your admin)
  • Screenshots: Add descriptions for screenshots #0, #0, #0, #0, #0, #0, #0 in multi-purpose-mail-form/assets to your readme.txt
  • Tags: There are too many tags (14 tag instead of maximum 10)
You can take inspiration from this readme.txt

multi-purpose-mail-form/multi-purpose-mail-form.php Passed 13 tests

The main PHP file in "Multi Purpose Mail Form" ver. 1.0.2 adds more information about the plugin and also serves as the entry point for this plugin
87 characters long description:
Create unlimited custom forms with unlimited fields. With Google ReCAPTCHA Integration.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected4,725 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
PHP196991,0164,043
SVG100288
CSS34152225
JavaScript430109169

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.33
Average class complexity20.78
▷ Minimum class complexity1.00
▷ Maximum class complexity97.00
Average method complexity4.24
▷ Minimum method complexity1.00
▷ Maximum method complexity33.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods55
▷ Static methods23.64%
▷ Public methods5090.91%
▷ Protected methods00.00%
▷ Private methods59.09%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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
PNG images were not found in this plugin