10% ultimate-forms

Code Review | Ultimate Forms

WordPress plugin Ultimate Forms scored10%from 54 tests.

About plugin

  • Plugin page: ultimate-forms
  • Plugin version: 0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-5.4
  • WordPress version: 6.3.1
  • First release: Aug 29, 2017
  • Latest release: Apr 15, 2021
  • Number of updates: 14
  • Update frequency: every 95.1 days
  • Top authors: Rustaurius (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /864 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
You still need to fix the following installer errors
  • Install procedure had errors
    • > Notice in wp-content/plugins/ultimate-forms/ultimate-forms.php+17
    Undefined variable: wpdb

Server metrics [RAM: ▼0.55MB] [CPU: ▼24.68ms] Passed 4 tests

A check of server-side resources used by Ultimate Forms
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.07 ▲0.6049.62 ▲1.25
Dashboard /wp-admin3.39 ▲0.0929.53 ▼23.32
Posts /wp-admin/edit.php3.39 ▲0.0334.25 ▼9.77
Add New Post /wp-admin/post-new.php3.39 ▼2.5028.69 ▼61.24
Media Library /wp-admin/upload.php3.39 ▲0.1630.71 ▼4.40
/wp-admin/admin.php?page=3.3932.07
Add New /wp-admin/post-new.php?post_type=ufp_form3.3935.42
Settings /wp-admin/admin.php?page=EWD-UFP-Options&DisplayPage=Options3.3935.43
Forms /wp-admin/edit.php?post_type=ufp_form3.3931.27

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 313 new files
Database: 4 new tables, 9 new options
New tables
wp_ufp_responses
ufp_submissions
wp_ufp_submissions
ufp_responses
New WordPress options
EWD_UFP_Maximum_Score
widget_recent-posts
widget_ufp_contact_form_widget
db_upgraded
theysaidso_admin_options
ufp_plugin_error
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Ultimate Forms
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,938 ▲17713.63 ▼0.6511.59 ▲9.7138.53 ▼4.74
Dashboard /wp-admin2,223 ▲465.53 ▼0.0786.03 ▼7.1837.79 ▼3.60
Posts /wp-admin/edit.php2,128 ▲281.98 ▼0.0340.53 ▲3.0935.85 ▲2.98
Add New Post /wp-admin/post-new.php1,551 ▲2523.39 ▲0.40598.18 ▼80.2053.28 ▼2.57
Media Library /wp-admin/upload.php1,422 ▲224.18 ▲0.0599.28 ▼8.8046.06 ▼3.21
/wp-admin/admin.php?page=280.420.093.48
Add New /wp-admin/post-new.php?post_type=ufp_form2,8208.28192.48160.29
Settings /wp-admin/admin.php?page=EWD-UFP-Options&DisplayPage=Options9882.2636.2742.74
Forms /wp-admin/edit.php?post_type=ufp_form1,1372.5441.1332.04

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/ultimate-forms/ultimate-forms.php+43
    Undefined index: EWD-UFP-Options
  • Zombie tables were found after uninstall: 4 tables
    • wp_ufp_submissions
    • ufp_responses
    • ufp_submissions
    • wp_ufp_responses
  • Zombie WordPress options detected upon uninstall: 9 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_ufp_contact_form_widget
    • widget_recent-posts
    • widget_recent-comments
    • ufp_plugin_error
    • EWD_UFP_Maximum_Score
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=ufp_form
    • > Notice in wp-content/plugins/ultimate-forms/ultimate-forms.php+43
    Undefined index: EWD-UFP-Options
  • 18 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=ufp_form
    • > Notice in wp-admin/menu-header.php+202
    Trying to access array offset on value of type null
    • > GET request to /wp-admin/post-new.php?post_type=ufp_form
    • > Notice in wp-content/plugins/ultimate-forms/Functions/EWD_UFP_Edit_Form_Page_Content.php+153
    Undefined index: Email_Messages_Array
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=ufp_form
    • > Notice in wp-content/plugins/ultimate-forms/Functions/EWD_UFP_Edit_Form_Page_Content.php+206
    Undefined index: Save_Submissions
    • > GET request to /wp-admin/post-new.php?post_type=ufp_form
    • > Notice in wp-content/plugins/ultimate-forms/Functions/EWD_UFP_Edit_Form_Page_Content.php+285
    Undefined index: Submitted_Successfully_Label
    • > GET request to /wp-admin/post-new.php?post_type=ufp_form
    • > Notice in wp-content/plugins/ultimate-forms/Functions/EWD_UFP_Edit_Form_Page_Content.php+291
    Undefined index: General_Failure_Label
    • > GET request to /wp-admin/post-new.php?post_type=ufp_form
    • > Notice in wp-content/plugins/ultimate-forms/Functions/EWD_UFP_Edit_Form_Page_Content.php+297
    Undefined index: Email_Failure_Label
    • > GET request to /wp-admin/post-new.php?post_type=ufp_form
    • > Notice in wp-content/plugins/ultimate-forms/Functions/EWD_UFP_Edit_Form_Page_Content.php+303
    Undefined index: Save_Failure_Label
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=ufp_form
    • > Notice in wp-content/plugins/ultimate-forms/Functions/EWD_UFP_Edit_Form_Page_Content.php+318
    Undefined index: Form_Layout
    • > GET request to /wp-admin/post-new.php?post_type=ufp_form
    • > Notice in wp-content/plugins/ultimate-forms/Functions/EWD_UFP_Edit_Form_Page_Content.php+316
    Undefined variable: Form_Styling
    • > GET request to /wp-admin/post-new.php?post_type=ufp_form
    • > Notice in wp-content/plugins/ultimate-forms/Functions/EWD_UFP_Edit_Form_Page_Content.php+326
    Undefined index: Form_Text_Color
    • > GET request to /wp-admin/post-new.php?post_type=ufp_form
    • > Notice in wp-content/plugins/ultimate-forms/Functions/EWD_UFP_Edit_Form_Page_Content.php+332
    Undefined index: Form_Background_Color
    • > GET request to /wp-admin/post-new.php?post_type=ufp_form
    • > Notice in wp-content/plugins/ultimate-forms/Functions/EWD_UFP_Edit_Form_Page_Content.php+339
    Undefined index: Form_Padding_Above
    • > GET request to /wp-admin/post-new.php?post_type=ufp_form
    • > Notice in wp-content/plugins/ultimate-forms/Functions/EWD_UFP_Edit_Form_Page_Content.php+345
    Undefined index: Form_Padding_Below
    • > GET request to /wp-admin/post-new.php?post_type=ufp_form
    • > Notice in wp-content/plugins/ultimate-forms/Functions/EWD_UFP_Edit_Form_Page_Content.php+351
    Undefined index: Form_Padding_Before
    • > GET request to /wp-admin/post-new.php?post_type=ufp_form
    • > Notice in wp-content/plugins/ultimate-forms/Functions/EWD_UFP_Edit_Form_Page_Content.php+357
    Undefined index: Form_Padding_After
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=ufp_form
    • > POST request to /wp-admin/admin-ajax.php
    • > Notice in wp-content/plugins/ultimate-forms/Functions/EWD_UFP_Process_Ajax.php+46
    unserialize(): Error at offset 0 of 9 bytes
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=EWD-UFP-Options&DisplayPage=Options
    • > Notice in wp-content/plugins/ultimate-forms/html/OptionsPage.php+16
    Undefined variable: Display_Tab
    • > GET request to /wp-admin/admin.php?page=EWD-UFP-Options&DisplayPage=Options
    • > Notice in wp-content/plugins/ultimate-forms/html/OptionsPage.php+79
    Undefined variable: ufp_Review_Title_Font
    • > GET request to /wp-admin/admin.php?page=EWD-UFP-Options&DisplayPage=Options
    • > Notice in wp-content/plugins/ultimate-forms/html/OptionsPage.php+79
    Undefined variable: ufp_Full_Version

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 3× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/ultimate-forms/html/AdminFooter.php
    • > /wp-content/plugins/ultimate-forms/Functions/EWD_UFP_Create_Captcha_Image.php
    • > /wp-content/plugins/ultimate-forms/PHPExcel/Classes/PHPExcel/Shared/JAMA/examples/benchmark.php
  • 129× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'PHPExcel_Writer_Excel2007_WriterPart' not found in wp-content/plugins/ultimate-forms/PHPExcel/Classes/PHPExcel/Writer/Excel2007/DocProps.php:28
    • > PHP Fatal error
      Uncaught Error: Class 'PHPExcel_Chart_Properties' not found in wp-content/plugins/ultimate-forms/PHPExcel/Classes/PHPExcel/Chart/GridLines.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'PHPExcel_Settings' not found in wp-content/plugins/ultimate-forms/PHPExcel/Classes/PHPExcel/Writer/PDF/tcPDF.php:4
    • > PHP Fatal error
      require_once(): Failed opening required 'PHPEXCEL_ROOTPHPExcel/Shared/trend/bestFitClass.php' (include_path='.:/usr/share/php') in wp-content/plugins/ultimate-forms/PHPExcel/Classes/PHPExcel/Shared/trend/exponentialBestFitClass.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'PHPExcel_Chart_Properties' not found in wp-content/plugins/ultimate-forms/PHPExcel/Classes/PHPExcel/Chart/Axis.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'PHPExcel_CachedObjectStorage_CacheBase' not found in wp-content/plugins/ultimate-forms/PHPExcel/Classes/PHPExcel/CachedObjectStorage/MemorySerialized.php:28
    • > PHP Fatal error
      Uncaught Error: Class 'PHPExcel_Writer_Abstract' not found in wp-content/plugins/ultimate-forms/PHPExcel/Classes/PHPExcel/Writer/Excel5.php:28
    • > PHP Warning
      require_once(PHPEXCEL_ROOTPHPExcel/Shared/trend/bestFitClass.php): failed to open stream: No such file or directory in wp-content/plugins/ultimate-forms/PHPExcel/Classes/PHPExcel/Shared/trend/polynomialBestFitClass.php on line 3
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/ultimate-forms/ultimate-forms.php on line 18
    • > PHP Notice
      Undefined index: decomposition in wp-content/plugins/ultimate-forms/PHPExcel/Classes/PHPExcel/Shared/JAMA/examples/benchmark.php on line 168

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
These are user-side errors you should fix
    • > GET request to /wp-admin/admin.php?page=
    • > Network (severe)
    wp-admin/admin.php?page= - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 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
These attributes need to be fixed:
  • Screenshots: Add descriptions for screenshots #1, #2, #3, #4, #5 in ultimate-forms/assets to your readme.txt
The official readme.txt might help

ultimate-forms/ultimate-forms.php Passed 13 tests

The primary PHP file in "Ultimate Forms" version 0.5 is used by WordPress to initiate all plugin functionality
61 characters long description:
Create and display forms, email or save the forms submissions

Code Analysis 95% 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
Good job! No executable or dangerous file extensions detected65,507 lines of code in 257 files:
LanguageFilesBlank linesComment linesLines of code
PHP24911,39237,04861,510
JavaScript54222322,354
CSS3159611,643

PHP code 0% from 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Please fix the following
  • Please reduce cyclomatic complexity of classes to less than 1000 (currently 1,019)
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 387)
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity48.24
▷ Minimum class complexity1.00
▷ Maximum class complexity1,019.00
Average method complexity4.63
▷ Minimum method complexity1.00
▷ Maximum method complexity387.00
Code structure
Namespaces0
Interfaces7
Traits0
Classes218
▷ Abstract classes104.59%
▷ Concrete classes20895.41%
▷ Final classes00.00%
Methods2,951
▷ Static methods62821.28%
▷ Public methods2,35979.94%
▷ Protected methods802.71%
▷ Private methods51217.35%
Functions61
▷ Named functions61100.00%
▷ Anonymous functions00.00%
Constants821
▷ Global constants12715.47%
▷ Class constants69484.53%
▷ Public constants694100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
13 PNG files occupy 0.19MB with 0.10MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/templates/Product_Inquiry.png34.34KB14.20KB▼ 58.67%
images/templates/Service_Request.png31.45KB12.94KB▼ 58.84%
images/ufp-buttonsicons-03.png5.51KB2.74KB▼ 50.25%
images/support_icons_ufp-01.png1.00KB0.47KB▼ 53.02%
images/templates/Contact_Info.png35.00KB14.22KB▼ 59.38%