10% nino-contact-form

Code Review | Nino contact form

WordPress plugin Nino contact form scored 10% from 54 tests.

About plugin

  • Plugin page: nino-contact-form
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-3.9.1
  • WordPress version: 5.8.1
  • First release: Aug 1, 2014
  • Latest release: Oct 12, 2014
  • Number of updates: 7
  • Update frequency: every 10.3 days
  • Top authors: ninotheme (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active / 3,266 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
These installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/nino-contact-form/includes/nino-contact-widget.php+10
    Methods with the same name as their class will not be constructors in a future version of PHP; nino_contact_widget has a deprecated constructor

Server metrics [RAM: ▼1.75MB] [CPU: ▼187.36ms] Passed 4 tests

An overview of server-side resources used by Nino contact form
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /1.88 ▼0.845.68 ▼18.05
Dashboard /wp-admin1.90 ▼1.165.81 ▼46.63
Posts /wp-admin/edit.php1.90 ▼1.218.41 ▼28.71
Add New Post /wp-admin/post-new.php1.90 ▼3.546.44 ▼645.53
Media Library /wp-admin/upload.php1.90 ▼1.105.32 ▼28.56

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 51 new files
Database: no new tables, 1 new option
New WordPress options
widget_nino_contact_widget

Browser metrics Passed 4 tests

A check of browser resources used by Nino contact form
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,723 ▲12716.26 ▲0.2012.45 ▲1.8946.12 ▼1.12
Dashboard /wp-admin3,009 ▲756.00 ▲0.06143.90 ▼17.38110.21 ▲0.90
Posts /wp-admin/edit.php2,759 ▲202.72 ▲0.0167.58 ▼5.9188.97 ▲1.93
Add New Post /wp-admin/post-new.php1,617 ▼5518.77 ▲0.02400.90 ▼4.58111.24 ▲3.61
Media Library /wp-admin/upload.php1,827 ▲175.04 ▲0.02159.28 ▼0.80110.24 ▼5.10

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/nino-contact-form/includes/nino-contact-widget.php+10
    Methods with the same name as their class will not be constructors in a future version of PHP; nino_contact_widget has a deprecated constructor
  • Zombie WordPress options detected upon uninstall: 1 option
    • widget_nino_contact_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 4× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/nino-contact-form/includes/libraries/captcha/securimage_math.php
    • > /wp-content/plugins/nino-contact-form/includes/libraries/captcha/securimage_show.php
    • > /wp-content/plugins/nino-contact-form/includes/libraries/captcha/securimage_multiple_words.php
    • > /wp-content/plugins/nino-contact-form/includes/admin/contact-form.php
  • 95× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: nino_contact_field_value in wp-content/plugins/nino-contact-form/includes/admin/contact-form.php on line 235
    • > PHP Notice
      Undefined variable: nino_contact_form_message_success in wp-content/plugins/nino-contact-form/includes/admin/contact-form.php on line 95
    • > PHP Notice
      Undefined variable: nino_contact_field_setting in wp-content/plugins/nino-contact-form/includes/admin/contact-form.php on line 33
    • > PHP Notice
      Undefined variable: nino_contact_input_group in wp-content/plugins/nino-contact-form/includes/contact-form-processing.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function nino_contact_layout_list() in wp-content/plugins/nino-contact-form/includes/admin/form-processing.php:9
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/nino-contact-form/includes/admin/contact-form.php on line 33
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/nino-contact-form/includes/nino-contact-render.php:176
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/nino-contact-form/includes/contact-form-processing.php on line 30
    • > PHP Notice
      Undefined variable: captcha_list in wp-content/plugins/nino-contact-form/includes/admin/contact-form.php on line 152
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/nino-contact-form/includes/admin/contact-form.php on line 95

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Tags: Please reduce the number of tags, currently 14 tag instead of maximum 10
The official readme.txt might help

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

The main file in "Nino contact form" v. 1.0.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
68 characters long description:
Nino Contact Form - The easiest way to get contact form to your site

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin4,372 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP145871,3412,619
CSS20391,031
SVG100504
JavaScript35038218
HTML1100

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity102.00
▷ Minimum class complexity3.00
▷ Maximum class complexity289.00
Average method complexity6.83
▷ Minimum method complexity1.00
▷ Maximum method complexity33.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods52
▷ Static methods47.69%
▷ Public methods2038.46%
▷ Protected methods3261.54%
▷ Private methods00.00%
Functions22
▷ Named functions22100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants110.00%
▷ Class constants990.00%
▷ Public constants9100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
16 PNG files occupy 0.08MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/assets/images/captcha-2.png3.35KB1.73KB▼ 48.34%
includes/assets/images/form-style-2.png1.95KB0.89KB▼ 54.34%
includes/libraries/captcha/images/audio_icon.png1.64KB2.04KB0.00%
includes/assets/images/layout-4.png1.26KB0.19KB▼ 84.67%
includes/assets/images/form-style-1.png1.96KB0.88KB▼ 55.15%