72% kiwi-contact-form

Code Review | Kiwi Contact Form

WordPress plugin Kiwi Contact Form scored72%from 54 tests.

About plugin

  • Plugin page: kiwi-contact-form
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.3.2
  • WordPress version: 6.3.1
  • First release: Jan 14, 2020
  • Latest release: Mar 11, 2020
  • Number of updates: 7
  • Update frequency: every 8.3 days
  • Top authors: kiwiplugins (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /624 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲1.62MB] [CPU: ▲1.08ms] Passed 4 tests

An overview of server-side resources used by Kiwi Contact Form
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.94 ▲1.4843.33 ▲1.52
Dashboard /wp-admin4.97 ▲1.6356.16 ▼6.47
Posts /wp-admin/edit.php5.09 ▲1.7358.25 ▲13.68
Add New Post /wp-admin/post-new.php7.59 ▲1.7192.48 ▼4.39
Media Library /wp-admin/upload.php4.90 ▲1.6745.84 ▲13.64
Integration /wp-admin/admin.php?page=kiwi-integration4.8739.31
Add New /wp-admin/admin.php?page=kiwi-new4.9848.09
Contact Forms /wp-admin/admin.php?page=kiwi4.9241.24
FAQ /wp-admin/admin.php?page=kiwi-faq4.8740.20

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 81 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
kiwi
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Kiwi Contact Form
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,837 ▲6613.76 ▼0.671.47 ▼0.5723.65 ▼21.98
Dashboard /wp-admin2,246 ▲585.13 ▼0.77115.61 ▲1.9246.45 ▼0.64
Posts /wp-admin/edit.php2,126 ▲402.30 ▲0.3038.65 ▲2.7941.15 ▲7.45
Add New Post /wp-admin/post-new.php1,708 ▲18324.95 ▲1.59646.93 ▼0.4554.13 ▲5.31
Media Library /wp-admin/upload.php1,428 ▲404.43 ▲0.15100.68 ▼10.9247.92 ▲0.45
Integration /wp-admin/admin.php?page=kiwi-integration9222.0030.2032.49
Add New /wp-admin/admin.php?page=kiwi-new3,5312.5248.7544.35
Contact Forms /wp-admin/admin.php?page=kiwi1,1712.0933.6738.73
FAQ /wp-admin/admin.php?page=kiwi-faq9782.1529.8629.07

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • theysaidso_admin_options
    • kiwi
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

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

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/kiwi-contact-form/components/edit-contact-form.php
  • 37× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/kiwi-contact-form/admin/modules/contact-form-functions.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/kiwi-contact-form/components/textarea.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/kiwi-contact-form/kiwi.php:63
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/kiwi-contact-form/admin/modules/config-validator.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/kiwi-contact-form/components/file.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/kiwi-contact-form/components/capabilities.php:3
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/kiwi-contact-form/admin/modules/contact-form-functions.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/kiwi-contact-form/components/mail.php:231
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/kiwi-contact-form/components/text.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/kiwi-contact-form/components/acceptance.php:8

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following user-side errors
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=kiwi-faq
    • > Network (severe)
    wp-content/plugins/kiwi-contact-form/admin/js/tag-generator.js?ver=1.0.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=kiwi
    • > Intervention (severe) in unknown
    /wp-admin/admin.php?page=kiwi-new - Blocked attempt to show a 'beforeunload' confirmation panel for a frame that never had a user gesture since its load. https://www.chromestatus.com/feature/5082396709879808

Optimizations

Plugin configuration 86% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
9 plugin tags: contact form, contact, feedback, ajax, multilingual...

kiwi-contact-form/index.php 69% from 13 tests

The main PHP file in "Kiwi Contact Form" ver. 1.0.1 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 302 characters long)
  • Text Domain: Please use dashes and lowercase characters for text domains
  • Domain Path: The domain path folder was not found ("/languages/")
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("kiwi-contact-form.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected13,050 lines of code in 65 files:
LanguageFilesBlank linesComment linesLines of code
PHP492,88320710,125
CSS101591212,071
JavaScript621926854

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity30.67
▷ Minimum class complexity1.00
▷ Maximum class complexity106.00
Average method complexity3.27
▷ Minimum method complexity1.00
▷ Maximum method complexity33.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes24
▷ Abstract classes14.17%
▷ Concrete classes2395.83%
▷ Final classes00.00%
Methods316
▷ Static methods299.18%
▷ Public methods25079.11%
▷ Protected methods288.86%
▷ Private methods3812.03%
Functions238
▷ Named functions238100.00%
▷ Anonymous functions00.00%
Constants33
▷ Global constants1648.48%
▷ Class constants1751.52%
▷ Public constants17100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
14 PNG files occupy 0.06MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/views/images/helper.png34.82KB15.39KB▼ 55.80%
client/views/js/jquery-ui/themes/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png0.32KB0.15KB▼ 54.82%
client/views/js/jquery-ui/themes/smoothness/images/ui-icons_888888_256x240.png6.83KB4.17KB▼ 38.92%
client/views/js/jquery-ui/themes/smoothness/images/ui-icons_454545_256x240.png6.83KB4.17KB▼ 38.86%
client/views/js/jquery-ui/themes/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png0.27KB0.18KB▼ 35.00%