10% sexy-contact-form

Code Review | Creative Contact Form

WordPress plugin Creative Contact Form scored 10% from 53 tests.

About plugin

  • Plugin page: sexy-contact-form
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.1
  • WordPress version: 5.8.1
  • First release: Oct 1, 2013
  • Latest release: Mar 13, 2015
  • Number of updates: 450
  • Update frequency: every 1.2 days
  • Top authors: creative-solutions (68.44%)2glux (31.78%)

Code review

53 tests

User reviews

24 reviews

Install metrics

600+ active / 59,584 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
You still need to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/sexy-contact-form/includes/sexycontactform_widget.php+3
    Methods with the same name as their class will not be constructors in a future version of PHP; sexycontactform_widget has a deprecated constructor

Server metrics [RAM: ▼1.69MB] [CPU: ▼315.18ms] Passed 4 tests

Analyzing server-side resources used by Creative Contact Form
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /1.94 ▼0.785.94 ▼19.42
Dashboard /wp-admin1.96 ▼1.095.47 ▼47.04
Posts /wp-admin/edit.php1.96 ▼1.145.42 ▼44.46
Add New Post /wp-admin/post-new.php1.96 ▼3.477.46 ▼1,130.92
Media Library /wp-admin/upload.php1.96 ▼1.045.88 ▼38.28
Forms /wp-admin/admin.php?page=sexyforms1.965.80
Fields /wp-admin/admin.php?page=sexyfields1.966.47
Overview /wp-admin/admin.php?page=sexycontactform1.967.79
Templates /wp-admin/admin.php?page=sexytemplates1.968.87

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 260 new files
Database: no new tables, 2 new options
New WordPress options
widget_sexycontactform_widget
wpscf_db_version

Browser metrics Passed 4 tests

A check of browser resources used by Creative Contact Form
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,692 ▲12115.79 ▼0.067.37 ▼2.9549.44 ▼12.26
Dashboard /wp-admin2,966 ▲736.08 ▲0.10147.48 ▼54.54133.23 ▼2.75
Posts /wp-admin/edit.php2,761 ▲552.67 ▼0.0264.94 ▼22.1786.73 ▼29.54
Add New Post /wp-admin/post-new.php1,879 ▲22318.73 ▲0.30375.61 ▼32.52120.20 ▲8.71
Media Library /wp-admin/upload.php1,759 ▼135.01 ▼0.05130.72 ▼42.13131.70 ▲8.48
Forms /wp-admin/admin.php?page=sexyforms1,3132.8368.11103.83
Fields /wp-admin/admin.php?page=sexyfields1,3633.0779.00109.68
Overview /wp-admin/admin.php?page=sexycontactform1,3302.0859.09109.34
Templates /wp-admin/admin.php?page=sexytemplates1,3212.7061.92121.89

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/sexy-contact-form/includes/sexycontactform_widget.php+3
    Methods with the same name as their class will not be constructors in a future version of PHP; sexycontactform_widget has a deprecated constructor
  • This plugin does not fully uninstall, leaving 1 option in the database
    • widget_sexycontactform_widget

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=sexytemplates
    • > Deprecated in wp-content/plugins/sexy-contact-form/includes/sexycontactform_widget.php+3
    Methods with the same name as their class will not be constructors in a future version of PHP; sexycontactform_widget has a deprecated constructor
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=sexytemplates
    • > Deprecated in wp-content/plugins/sexy-contact-form/includes/sexycontactform_widget.php+76
    Function create_function() is deprecated
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=sexytemplates
    • > User deprecated in wp-includes/functions.php+5304
    The called constructor method for WP_Widget in sexycontactform_widget is deprecated since version 4.3.0! Use __construct() instead.

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 5× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/sexy-contact-form/includes/resources/tools/dictionary-import/importwords.php
    • > /wp-content/plugins/sexy-contact-form/includes/admin/header.php
    • > /wp-content/plugins/sexy-contact-form/includes/admin/content.php
    • > /wp-content/plugins/sexy-contact-form/includes/captcha.php
    • > /wp-content/plugins/sexy-contact-form/includes/admin/footer.php
  • 72× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: id in wp-content/plugins/sexy-contact-form/includes/admin/form.php on line 15
    • > PHP Notice
      Undefined variable: id in wp-content/plugins/sexy-contact-form/includes/admin/form.php on line 13
    • > PHP Notice
      Undefined variable: id in wp-content/plugins/sexy-contact-form/includes/admin/form.php on line 37
    • > PHP Notice
      Undefined variable: id in wp-content/plugins/sexy-contact-form/includes/admin/form.php on line 14
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_var() on null in wp-content/plugins/sexy-contact-form/includes/admin/form_submit.php:7
    • > PHP Notice
      Undefined variable: id in wp-content/plugins/sexy-contact-form/includes/admin/form.php on line 11
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/sexy-contact-form/includes/admin/template_submit.php on line 8
    • > PHP Notice
      Undefined variable: page in wp-content/plugins/sexy-contact-form/includes/admin/content.php on line 11
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/sexy-contact-form/includes/resources/tools/dictionary-import/importwords.php on line 23
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/sexy-contact-form/includes/admin/fields.php on line 62

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
These are user-side errors you should fix
    • > GET request to /wp-admin/admin.php?page=sexyfields
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-mouse,jquery-ui-sortable,jquery-ui-resizable,jquery-ui-draggable,jquer&load%5Bchunk_1%5D=y-ui-controlgroup,jquery-ui-checkboxradio,jquery-ui-button,jquery-ui-dialog,jquery-ui-tabs&ver=5.8.1 1:31592 "jQuery.Deferred exception: $(...).live is not a function" "TypeError: $(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/sexy-contact-form/includes/js/options_functions.js?ver=5.8.1:56:27)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-mouse,jquery-ui-sortable,jquery-ui-resizable,jquery-ui-draggable,jquer&load%5Bchunk_1%5D=y-ui-controlgroup,jquery-ui-checkboxradio,jquery-ui-button,jquery-ui-dialog,jquery-ui-tabs&ver=5.8.1:2:30038)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-mouse,jquery-ui-sortable,jquery-ui-resizable,jquery-ui-draggable,jquer&load%5Bchunk_1%5D=y-ui-controlgroup,jquery-ui-checkboxradio,jquery-ui-button,jquery-ui-dialog,jquery-ui-tabs&ver=5.8.1:2:30340)" undefined
    • > GET request to /wp-admin/admin.php?page=sexyfields
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-mouse,jquery-ui-sortable,jquery-ui-resizable,jquery-ui-draggable,jquer&load%5Bchunk_1%5D=y-ui-controlgroup,jquery-ui-checkboxradio,jquery-ui-button,jquery-ui-dialog,jquery-ui-tabs&ver=5.8.1 1:31702 Uncaught TypeError: $(...).live is not a function

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 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
Attributes that need to be fixed:
  • Tags: Please reduce the number of tags, currently 88 tag instead of maximum 10
You can take inspiration from this readme.txt

sexy-contact-form/sexycontactform.php 85% from 13 tests

This is the main PHP file of "Creative Contact Form" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("sexy-contact-form.php" instead of "sexycontactform.php")
  • Description: The description should be shorter than 140 characters (currently 153 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin14,559 lines of code in 62 files:
LanguageFilesBlank linesComment linesLines of code
PHP2853093,9785,424
CSS182861644,728
JavaScript153955854,406
HTML1001

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.23
Average class complexity17.50
▷ Minimum class complexity5.00
▷ Maximum class complexity30.00
Average method complexity2.94
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods741.18%
▷ Protected methods1058.82%
▷ Private methods00.00%
Functions22
▷ Named functions22100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 1 test

Image compression Passed 1 test

PNG files should be compressed to save space and minimize bandwidth usage
142 PNG files occupy 0.32MB with 0.07MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/images/statistics_16.png1.68KB1.05KB▼ 37.80%
includes/images/icon-16-deny.png0.44KB0.42KB▼ 4.44%
includes/assets/images/sexycheckboxes/icons-black.png4.25KB2.42KB▼ 42.93%
includes/images/custom_rgb_b.png0.98KB0.74KB▼ 25.00%
includes/images/colorpicker_background.png1.85KB2.14KB0.00%