62% alidani-contact-form

Code Review | ALIDANI Contact forms

WordPress plugin ALIDANI Contact forms scored 62% from 54 tests.

About plugin

  • Plugin page: alidani-contact-form
  • Plugin version: 1.4
  • PHP compatiblity: 5.6.25+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jun 26, 2021
  • Latest release: Sep 13, 2021
  • Number of updates: 10
  • Update frequency: every 8.4 days
  • Top authors: ehssan1985 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 862 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼1.16MB] [CPU: ▼44.81ms] Passed 4 tests

Analyzing server-side resources used by ALIDANI Contact forms
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.81 ▼0.6513.97 ▼31.82
Dashboard /wp-admin2.85 ▼0.4517.67 ▼28.90
Posts /wp-admin/edit.php2.85 ▼0.5116.99 ▼32.30
Add New Post /wp-admin/post-new.php2.85 ▼3.0417.99 ▼86.21
Media Library /wp-admin/upload.php2.85 ▼0.3817.65 ▼17.66
/wp-admin/admin.php?page=editadminform2.8516.69
Received Emails /wp-admin/admin.php?page=alidaniform2.8516.60
/wp-admin/admin.php?page=sendadminform2.8517.81
Form Redesign /wp-admin/admin.php?page=alidaninewform2.8517.24
Admin info /wp-admin/admin.php?page=alidaniadmininfo2.8516.15
/wp-admin/admin.php?page=editform2.8516.31

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 19 new files
Database: 3 new tables, 6 new options
New tables
wp_alidani_contact_form_color_font
wp_alidani_contact_form_admin_info
wp_alidani_contact_form_admin
New WordPress options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for ALIDANI Contact forms
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,262 ▲52714.48 ▼0.049.10 ▲7.2135.84 ▼11.48
Dashboard /wp-admin2,294 ▲1025.38 ▲0.5157.66 ▼55.3730.87 ▼8.52
Posts /wp-admin/edit.php2,219 ▲1272.31 ▲0.2524.49 ▼14.7728.27 ▼6.16
Add New Post /wp-admin/post-new.php1,646 ▲11323.55 ▲0.27560.30 ▼64.8128.60 ▼27.24
Media Library /wp-admin/upload.php1,187 ▼2013.86 ▼0.5853.62 ▼42.4321.36 ▼22.14
/wp-admin/admin.php?page=editadminform1,0312.5325.0036.79
Received Emails /wp-admin/admin.php?page=alidaniform9952.4023.2326.28
/wp-admin/admin.php?page=sendadminform1,1322.3526.3222.49
Form Redesign /wp-admin/admin.php?page=alidaninewform1,2232.3223.7325.11
Admin info /wp-admin/admin.php?page=alidaniadmininfo1,0822.5324.0827.98
/wp-admin/admin.php?page=editform1,0492.3726.2024.37

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin cannot be uninstalled
    • > User notice in wp-includes/functions.php+5905
    Function WP_Scripts::localize was called incorrectly. The $l10n parameter must be an array. To pass arbitrary data to scripts, use the wp_add_inline_script() function instead. Please see Debugging in WordPress for more information. (This message was added in version 5.7.0.)
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments

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
These server-side errors were triggered
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=editform
    • > User notice in wp-includes/functions.php+5905
    Function WP_Scripts::localize was called incorrectly. The $l10n parameter must be an array. To pass arbitrary data to scripts, use the wp_add_inline_script() function instead. Please see Debugging in WordPress for more information. (This message was added in version 5.7.0.)
  • 16 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=editform
    • > Notice in wp-content/plugins/alidani-contact-form/views/alidani_edit_page.php+53
    Trying to access array offset on value of type null

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
  • 7× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/alidani-contact-form/views/alidani_recieve_contact_form.php:5
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_row() on null in wp-content/plugins/alidani-contact-form/views/alidani_edit_page.php:5
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_row() on null in wp-content/plugins/alidani-contact-form/views/alidani_admin_edit_page.php:5
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_row() on null in wp-content/plugins/alidani-contact-form/views/alidani_admin_send_page.php:5
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_row() on null in wp-content/plugins/alidani-contact-form/views/alidani_new_form_page.php:4
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_row() on null in wp-content/plugins/alidani-contact-form/views/alidani_front_contact_form.php:4
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/alidani-contact-form/views/alidani_admin_info_page.php:4

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following browser errors
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=editform
    • > Javascript (severe) in unknown
    /wp-admin/js/common.min.js?ver=6.3.1 1:12295 Uncaught TypeError: f.find(...).hoverIntent is not a function
    • > GET request to /wp-admin/admin.php?page=alidaninewform
    • > Rendering (warning) in unknown
    /wp-admin/admin.php?page=alidaninewform 201 The specified value "#000" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/admin.php?page=alidaninewform
    • > Rendering (warning) in unknown
    /wp-admin/admin.php?page=alidaninewform 213 The specified value "#fff" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/admin.php?page=alidaninewform
    • > Rendering (warning) in unknown
    /wp-admin/admin.php?page=alidaninewform 219 The specified value "#fff" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/admin.php?page=alidaninewform
    • > Rendering (warning) in unknown
    /wp-admin/admin.php?page=alidaninewform 225 The specified value "#fff" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/admin.php?page=alidaninewform
    • > Rendering (warning) in unknown
    /wp-admin/admin.php?page=alidaninewform 231 The specified value "#000" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Screenshots: Add descriptions for screenshots #0, #0, #0 in alidani-contact-form/assets to your readme.txt
  • Screenshots: These screenshots do not have images: #1 (Form Redesign page.), #2 (Admin info page.), #3 (Received Emails page.)
You can look at the official readme.txt

alidani-contact-form/wp-alidani-contact-form.php 92% from 13 tests

This is the main PHP file of "ALIDANI Contact forms" version 1.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("alidani-contact-form.php" instead of "wp-alidani-contact-form.php")

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
There were no executable files found in this plugin1,545 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP812237825
JavaScript67859535
CSS42327185

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions19
▷ Named functions19100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
There were not PNG files found in your plugin