73% quick-contact-form

Code Review | Quick Contact Form

WordPress plugin Quick Contact Form scored73%from 54 tests.

About plugin

  • Plugin page: quick-contact-form
  • Plugin version: 8.0.6.9
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.3
  • WordPress version: 6.3.1
  • First release: Mar 15, 2012
  • Latest release: Aug 1, 2023
  • Number of updates: 208
  • Update frequency: every 20.0 days
  • Top authors: aerin (83.17%)fullworks (17.31%)

Code review

54 tests

User reviews

20 reviews

Install metrics

2,000+ active /154,867 total downloads

Benchmarks

Plugin footprint 64% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲5.52MB] [CPU: ▲37.47ms] 50% from 4 tests

Analyzing server-side resources used by Quick Contact Form
Please have a look at the following items
  • CPU: The total CPU usage must kept under 500.00ms (currently 1,721.02ms on /wp-admin/options-general.php?page=quick-contact-form)
  • Extra RAM: The extra memory usage should kept under 5MB (currently 5.52MB on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /9.21 ▲5.7579.15 ▲37.62
Dashboard /wp-admin9.23 ▲5.9398.63 ▲43.61
Posts /wp-admin/edit.php9.23 ▲5.8898.46 ▲37.76
Add New Post /wp-admin/post-new.php10.40 ▲4.52130.29 ▲30.88
Media Library /wp-admin/upload.php9.23 ▲6.0089.99 ▲52.53
Quick Contact /wp-admin/options-general.php?page=quick-contact-form9.231,721.02
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius9.2378.11

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 300 new files
Database: no new tables, 11 new options
New WordPress options
can_compress_scripts
fs_debug_mode
theysaidso_admin_options
widget_theysaidso_widget
fs_accounts
fs_active_plugins
qcf_legacy_free
widget_qcf_widget
widget_recent-posts
db_upgraded
...

Browser metrics Passed 4 tests

Checking browser requirements for Quick Contact Form
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,130 ▲36915.56 ▲1.288.06 ▲6.0329.23 ▼15.81
Dashboard /wp-admin2,423 ▲2436.55 ▲1.03122.35 ▲35.7049.99 ▲5.32
Posts /wp-admin/edit.php2,355 ▲2523.77 ▲1.8059.00 ▲14.2638.73 ▲2.93
Add New Post /wp-admin/post-new.php1,767 ▲23925.03 ▲2.08661.04 ▲31.3239.95 ▼9.01
Media Library /wp-admin/upload.php1,488 ▲914.60 ▲0.4284.80 ▼16.9045.60 ▲1.39
Quick Contact /wp-admin/options-general.php?page=quick-contact-form1,2173.5145.65108.26
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius1,3333.4847.8527.54

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/quick-contact-form/vendor/freemius/wordpress-sdk/includes/class-freemius.php+8486
    Undefined property: stdClass::$plugins
  • This plugin did not uninstall successfully, leaving 11 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • fs_accounts
    • fs_active_plugins
    • widget_qcf_widget
    • fs_debug_mode
    • can_compress_scripts
    • widget_recent-posts
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 28× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function qcf_get_stored_setup() in wp-content/plugins/quick-contact-form/messages.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/quick-contact-form/settings.php:1915
    • > PHP Fatal error
      Uncaught Error: Class 'ActiveCampaign' not found in wp-content/plugins/quick-contact-form/activecampaign/Contact.class.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'ActiveCampaign' not found in wp-content/plugins/quick-contact-form/activecampaign/List.class.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'ActiveCampaign' not found in wp-content/plugins/quick-contact-form/activecampaign/Segment.class.php:3
    • > PHP Warning
      Use of undefined constant QUICK_CONTACT_FORM_PLUGIN_DIR - assumed 'QUICK_CONTACT_FORM_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/quick-contact-form/control/class-user-template-loader.php on line 28
    • > PHP Fatal error
      Uncaught Error: Class 'AC_Contact' not found in wp-content/plugins/quick-contact-form/activecampaign/Subscriber.class.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/quick-contact-form/legacy/settings.php:1635
    • > PHP Fatal error
      Uncaught Error: Class 'ActiveCampaign' not found in wp-content/plugins/quick-contact-form/activecampaign/Webhook.class.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'ActiveCampaign' not found in wp-content/plugins/quick-contact-form/activecampaign/Auth.class.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% 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
Attributes that require attention:
  • Screenshots: These screenshots require images: #1 (This is main admin screen.), #2 (This is an example of multiple forms on a single page. Everything on the form is editable.), #3 (This is the messages screen (a copy of all the emails sent from the form).)
The official readme.txt is a good inspiration

quick-contact-form/quick-contact-form.php 92% from 13 tests

The main file in "Quick Contact Form" v. 8.0.6.9 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 199 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin44,283 lines of code in 198 files:
LanguageFilesBlank linesComment linesLines of code
PHP1659,04918,14641,815
CSS2060761,456
JavaScript12217248991
Sass11021

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
These items need your attention
  • Class cyclomatic complexity has to be reduced to less than 1000 (currently 3,073)
Cyclomatic complexity
Average complexity per logical line of code0.55
Average class complexity54.30
▷ Minimum class complexity1.00
▷ Maximum class complexity3,073.00
Average method complexity4.07
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces5
Interfaces0
Traits0
Classes87
▷ Abstract classes22.30%
▷ Concrete classes8597.70%
▷ Final classes00.00%
Methods1,538
▷ Static methods20213.13%
▷ Public methods1,13273.60%
▷ Protected methods211.37%
▷ Private methods38525.03%
Functions228
▷ Named functions21996.05%
▷ Anonymous functions93.95%
Constants152
▷ Global constants10468.42%
▷ Class constants4831.58%
▷ Public constants48100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
25 PNG files occupy 0.09MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
ui/user/css/jquery/images/ui-bg_glass_65_ffffff_1x400.png0.24KB0.09KB▼ 64.23%
ui/user/css/jquery/images/ui-icons_ffffff_256x240.png6.32KB4.18KB▼ 33.80%
ui/user/css/jquery/images/ui-bg_glass_100_fdf5ce_1x400.png0.38KB0.16KB▼ 58.66%
images/doc.png3.57KB1.61KB▼ 54.95%
legacy/images/pdf.png3.38KB1.56KB▼ 53.89%