53% contact-form-master

Code Review | Contact Form Master - by Edmon

WordPress plugin Contact Form Master - by Edmon scored53%from 54 tests.

About plugin

  • Plugin page: contact-form-master
  • Plugin version: 1.0.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.9
  • WordPress version: 6.3.1
  • First release: Jan 17, 2017
  • Latest release: Feb 20, 2018
  • Number of updates: 84
  • Update frequency: every 4.7 days
  • Top authors: edmon.parker (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

200+ active /15,248 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.31MB] [CPU: ▼2.81ms] Passed 4 tests

An overview of server-side resources used by Contact Form Master - by Edmon
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.81 ▲0.3540.78 ▼1.91
Dashboard /wp-admin3.65 ▲0.3445.12 ▼3.21
Posts /wp-admin/edit.php3.70 ▲0.3449.28 ▼3.66
Add New Post /wp-admin/post-new.php6.18 ▲0.2993.18 ▼2.45
Media Library /wp-admin/upload.php3.51 ▲0.2736.65 ▲3.83
Contact Form /wp-admin/admin.php?page=YcfMenu3.4734.27
Add New /wp-admin/admin.php?page=addNewForm3.5134.36
Add Type /wp-admin/admin.php?page=addType3.4735.39

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 46 new files
Database: 2 new tables, 7 new options
New tables
wp_ycf_fields
wp_ycf_form
New WordPress options
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
db_upgraded
can_compress_scripts
YcfFormDraft
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Contact Form Master - by Edmon
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲9613.54 ▼0.844.11 ▲2.1442.57 ▼0.99
Dashboard /wp-admin2,237 ▲465.86 ▲1.00109.82 ▲6.3538.46 ▼7.07
Posts /wp-admin/edit.php2,123 ▲342.06 ▲0.0539.68 ▼1.9132.08 ▼2.40
Add New Post /wp-admin/post-new.php1,539 ▲2217.54 ▼0.01650.10 ▼29.3453.18 ▲1.49
Media Library /wp-admin/upload.php1,419 ▲314.23 ▼0.0198.49 ▼1.8941.31 ▼0.61
Contact Form /wp-admin/admin.php?page=YcfMenu8692.2540.2145.42
Add New /wp-admin/admin.php?page=addNewForm1,9357.21155.2836.87
Add Type /wp-admin/admin.php?page=addType8062.0626.1727.60

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin cannot be uninstalled
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, class 'YcfMenu' not found
  • The plugin did not uninstall successfully, leaving 2 tables in the database
    • wp_ycf_form
    • wp_ycf_fields
  • The uninstall procedure has failed, leaving 7 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • YcfFormDraft
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
  • 24 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=addNewForm
    • > Notice in wp-content/plugins/contact-form-master/classes/form/YcfForm.php+162
    Trying to access array offset on value of type null
    • > GET request to /wp-admin/admin.php?page=addNewForm
    • > Notice in wp-content/plugins/contact-form-master/views/contact/AddNew.php+6
    Undefined variable: hiddenInputContent

SRP 50% 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
  • 24× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      require_once(): Failed opening required 'YCF_CLASSES_FORMYcfForm.php' (include_path='.:/usr/share/php') in wp-content/plugins/contact-form-master/classes/form/YcfBuilder.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to a member function createFormAdminElement() on null in wp-content/plugins/contact-form-master/views/contact/AddNew.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/contact-form-master/views/addType.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'YcfForm' not found in wp-content/plugins/contact-form-master/views/contact/ysfFormFields.php:9
    • > PHP Notice
      Undefined variable: formBuilderObj in wp-content/plugins/contact-form-master/views/contact/AddNew.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/contact-form-master/config.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'YcfForm' not found in wp-content/plugins/contact-form-master/views/ycfMainView.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'YcfDefaultValues' not found in wp-content/plugins/contact-form-master/views/contact/ysfFormDesign.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/contact-form-master/views/expmAddNew.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'YcfDefaultValues' not found in wp-content/plugins/contact-form-master/views/tab_option/ysfFormDesign.php:2

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following user-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=addNewForm
    • > Network (severe)
    wp-content/plugins/contact-form-master/js/mailchimpBackend.js?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
2 plugin tags: form, tags contact form

contact-form-master/contact-form-master.php Passed 13 tests

This is the main PHP file of "Contact Form Master - by Edmon" version 1.0.7, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
44 characters long description:
Contact form master created by Edmon Parker.

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
No dangerous file extensions were detected9,849 lines of code in 37 files:
LanguageFilesBlank linesComment linesLines of code
CSS466157,121
PHP28519492,265
JavaScript511711463

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity11.18
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.23
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes17
▷ Abstract classes15.88%
▷ Concrete classes1694.12%
▷ Final classes00.00%
Methods142
▷ Static methods3625.35%
▷ Public methods13192.25%
▷ Protected methods32.11%
▷ Private methods85.63%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants25
▷ Global constants25100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
4 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/MailchimpPro.png33.11KB10.18KB▼ 69.25%
img/Recycle-bin.png1.87KB1.13KB▼ 39.61%
img/contact-form.png2.96KB1.38KB▼ 53.62%
img/conf-home.png1.55KB1.36KB▼ 11.87%