77% voice-shopping-for-woocommerce

Code Review | Voice Shopping for WooCommerce

WordPress plugin Voice Shopping for WooCommerce scored77%from 54 tests.

About plugin

  • Plugin page: voice-shopping-fo...
  • Plugin version: 2.0.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Oct 2, 2020
  • Latest release: Jun 10, 2023
  • Number of updates: 8
  • Update frequency: every 122.6 days
  • Top authors: mspanwa2 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /925 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲1.38MB] [CPU: ▲537.94ms] 50% from 4 tests

A check of server-side resources used by Voice Shopping for WooCommerce
The following require your attention
  • CPU: The total CPU usage must kept under 500.00ms (currently 692.36ms on /wp-admin/options-general.php?page=wcv-assistant-settings)
  • Extra CPU: The extra CPU usage must be under 200.00ms (currently 537.94ms on /wp-admin/options-general.php?page=wcv-assistant-settings)
PageMemory (MB)CPU Time (ms)
Home /4.83 ▲1.37598.00 ▲556.65
Dashboard /wp-admin4.69 ▲1.39579.69 ▲525.81
Posts /wp-admin/edit.php4.75 ▲1.39603.31 ▲552.68
Add New Post /wp-admin/post-new.php7.30 ▲1.41626.53 ▲530.95
Media Library /wp-admin/upload.php4.62 ▲1.39581.07 ▲542.33
Voice Shopping For Woocommerce /wp-admin/options-general.php?page=wcv-assistant-settings4.62692.36

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 178 new files
Database: no new tables, 17 new options
New WordPress options
widget_theysaidso_widget
wcv_assistant_floating_mic_position
wcv_assistant_api_system_key
wcv_assistant_voice
wcv_assistant_license_key
wcv_assistant_mic_listening_timeout
wcv_assistant_searchable_hints
theysaidso_admin_options
widget_recent-posts
wcv_assistant_type_of_search
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Voice Shopping for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,994 ▲20814.80 ▲0.166.97 ▲4.9147.19 ▲2.60
Dashboard /wp-admin2,283 ▲1065.57 ▼0.0386.95 ▼9.5164.91 ▲23.93
Posts /wp-admin/edit.php2,189 ▲922.16 ▲0.1539.23 ▲1.7336.73 ▲0.51
Add New Post /wp-admin/post-new.php1,596 ▲6821.18 ▼1.79682.57 ▲68.6953.29 ▼3.65
Media Library /wp-admin/upload.php1,479 ▲764.06 ▼0.2499.00 ▼3.3373.46 ▲30.49
Voice Shopping For Woocommerce /wp-admin/options-general.php?page=wcv-assistant-settings11,1551.7627.50117.21

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 17 options
    • theysaidso_admin_options
    • can_compress_scripts
    • wcv_assistant_first_activation
    • wcv_assistant_searchable_hints
    • wcv_assistant_api_system_key
    • widget_recent-posts
    • wcv_assistant_mic_listening_timeout
    • wcv_assistant_floating_mic_position
    • widget_theysaidso_widget
    • wcv_assistant_trial_valid_until
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

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
The following issues need your attention
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/voice-shopping-for-woocommerce/classes/rest-api/vendor/automattic/woocommerce/tests/bootstrap.php
  • 7× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/voice-shopping-for-woocommerce/classes/rest-api/vendor/automattic/woocommerce/tests/WooCommerce/Tests/HttpClient/OAuthTest.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/voice-shopping-for-woocommerce/classes/rest-api/vendor/automattic/woocommerce/tests/WooCommerce/Tests/HttpClient/HttpClientExceptionTest.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/voice-shopping-for-woocommerce/classes/rest-api/vendor/automattic/woocommerce/tests/WooCommerce/Tests/HttpClient/BasicAuthTest.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/voice-shopping-for-woocommerce/classes/rest-api/vendor/automattic/woocommerce/tests/WooCommerce/Tests/HttpClient/RequestTest.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/voice-shopping-for-woocommerce/classes/rest-api/vendor/automattic/woocommerce/tests/WooCommerce/Tests/ClientTest.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/voice-shopping-for-woocommerce/classes/rest-api/vendor/automattic/woocommerce/tests/WooCommerce/Tests/HttpClient/ResponseTest.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/voice-shopping-for-woocommerce/classes/rest-api/vendor/automattic/woocommerce/tests/WooCommerce/Tests/HttpClient/OptionsTest.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention: You can take inspiration from this readme.txt

voice-shopping-for-woocommerce/voice-shopping-for-woocommerce.php 85% from 13 tests

Analyzing the main PHP file in "Voice Shopping for WooCommerce" version 2.0.0
It is important to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 196 characters long)
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist

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
There were no executable files found in this plugin11,838 lines of code in 72 files:
LanguageFilesBlank linesComment linesLines of code
PHP339351,5756,884
JavaScript148199743,421
CSS420491,080
SVG1214181
Markdown1400118
JSON400107
XML21026
YAML26021

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity18.11
▷ Minimum class complexity1.00
▷ Maximum class complexity310.00
Average method complexity3.32
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes28
▷ Abstract classes00.00%
▷ Concrete classes28100.00%
▷ Final classes00.00%
Methods191
▷ Static methods2714.14%
▷ Public methods15882.72%
▷ Protected methods2613.61%
▷ Private methods73.66%
Functions15
▷ Named functions426.67%
▷ Anonymous functions1173.33%
Constants35
▷ Global constants1131.43%
▷ Class constants2468.57%
▷ Public constants24100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
5 compressed PNG files occupy 0.01MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/wcva-widget-robot.png0.96KB0.98KB0.00%
images/wcva-floating-mic-icon.png0.82KB0.86KB0.00%
images/speak2web_logo.png3.16KB3.26KB0.00%
images/Voice Assistant Bot Icon.png3.06KB3.20KB0.00%
images/wcva-floating-robot-icon.png1.25KB1.30KB0.00%