89% voice-search-for-woocommerce

Code Review | Voice Search For WooCommerce

WordPress plugin Voice Search For WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: voice-search-for-...
  • Plugin version: 2.1.0
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.2-6.2.2
  • WordPress version: 6.3.1
  • First release: Aug 17, 2022
  • Latest release: Jul 13, 2023
  • Number of updates: 7
  • Update frequency: every 47.0 days
  • Top authors: mspanwa2 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /667 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.76MB] [CPU: ▲543.87ms] 50% from 4 tests

This is a short check of server-side resources used by Voice Search For WooCommerce
Please take the time to fix the following items
  • CPU: Total CPU usage should be kept under 500.00ms (currently 573.06ms on /wp-admin/options-general.php?page=voice-search-for-woocommerce-settings)
  • Extra CPU: The extra CPU usage must be under 200.00ms (currently 543.87ms on /wp-admin/options-general.php?page=voice-search-for-woocommerce-settings)
PageMemory (MB)CPU Time (ms)
Home /4.26 ▲0.80605.20 ▲563.86
Dashboard /wp-admin4.07 ▲0.73604.45 ▲542.87
Posts /wp-admin/edit.php4.12 ▲0.77594.17 ▲541.80
Add New Post /wp-admin/post-new.php6.67 ▲0.79643.32 ▲536.76
Media Library /wp-admin/upload.php4.00 ▲0.77592.34 ▲554.03
Voice Search For WooCommerce /wp-admin/options-general.php?page=voice-search-for-woocommerce-settings3.91573.06

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 51 new files
Database: no new tables, 15 new options
New WordPress options
vswc_uuid
widget_recent-posts
vswc_api_system_key
can_compress_scripts
vswc_first_activation
widget_theysaidso_widget
vswc_floating_mic_position
vswc_selected_language
vswc_settings_updated_timestamp
widget_recent-comments
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Voice Search For WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,907 ▲13613.35 ▼0.975.50 ▲3.4546.30 ▼0.68
Dashboard /wp-admin2,238 ▲505.86 ▼0.04100.75 ▼7.3568.76 ▲23.69
Posts /wp-admin/edit.php2,121 ▲351.97 ▼0.0635.76 ▲0.5235.64 ▲3.45
Add New Post /wp-admin/post-new.php1,541 ▲1721.07 ▼2.36705.65 ▼4.4959.69 ▲6.00
Media Library /wp-admin/upload.php1,420 ▲354.17 ▼0.0293.16 ▼19.9285.77 ▲36.47
Voice Search For WooCommerce /wp-admin/options-general.php?page=voice-search-for-woocommerce-settings1,7342.0726.4652.26

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 14 options in the database
    • vswc_settings_updated_timestamp
    • theysaidso_admin_options
    • vswc_uuid
    • vswc_api_system_key
    • widget_recent-comments
    • vswc_floating_mic_position
    • widget_theysaidso_widget
    • vswc_floating_mic
    • db_upgraded
    • vswc_selected_language
    • ...

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% 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:
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

voice-search-for-woocommerce/voice-search-for-woocommerce.php 92% from 13 tests

The main PHP script in "Voice Search For WooCommerce" version 2.1.0 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Requires at least: Required version must match the one declared in readme.txt ("2.6" instead of "2.2")

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
No dangerous file extensions were detected6,850 lines of code in 28 files:
LanguageFilesBlank linesComment linesLines of code
PHP103584494,099
JavaScript74594411,880
CSS215236724
SVG71292
PO File17939
JSON10016

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity18.60
▷ Minimum class complexity1.00
▷ Maximum class complexity101.00
Average method complexity3.75
▷ Minimum method complexity1.00
▷ Maximum method complexity39.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods62
▷ Static methods1930.65%
▷ Public methods5080.65%
▷ Protected methods69.68%
▷ Private methods69.68%
Functions5
▷ Named functions360.00%
▷ Anonymous functions240.00%
Constants23
▷ Global constants417.39%
▷ Class constants1982.61%
▷ Public constants19100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/speak2web_logo.png3.16KB3.26KB0.00%