89% universal-voice-search

Code Review | Universal Voice Search

WordPress plugin Universal Voice Search scored89%from 54 tests.

About plugin

  • Plugin page: universal-voice-s...
  • Plugin version: 3.1.2
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.6-6.2.2
  • WordPress version: 6.3.1
  • First release: Oct 20, 2019
  • Latest release: Jul 13, 2023
  • Number of updates: 23
  • Update frequency: every 59.3 days
  • Top authors: mspanwa2 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

300+ active /8,858 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.11MB] [CPU: ▲548.51ms] 50% from 4 tests

Analyzing server-side resources used by Universal Voice Search
Please take the time to fix the following items
  • CPU: Try to keep total CPU usage under 500.00ms (currently 610.67ms on /wp-admin/options-general.php?page=universal-voice-search-settings)
  • Extra CPU: The extra CPU usage must be under 200.00ms (currently 548.51ms on /wp-admin/options-general.php?page=universal-voice-search-settings)
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.17620.23 ▲578.02
Dashboard /wp-admin3.45 ▲0.14590.23 ▲536.88
Posts /wp-admin/edit.php3.50 ▲0.14605.52 ▲558.75
Add New Post /wp-admin/post-new.php5.98 ▲0.10647.22 ▲549.84
Media Library /wp-admin/upload.php3.31 ▲0.08583.47 ▲548.58
Universal Voice Search /wp-admin/options-general.php?page=universal-voice-search-settings3.28610.67

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 60 new files
Database: no new tables, 15 new options
New WordPress options
uvs_settings_updated_timestamp
widget_recent-comments
uvs_first_activation
theysaidso_admin_options
can_compress_scripts
db_upgraded
uvs_floating_mic_position
widget_recent-posts
uvs_floating_mic
uvs_selected_language
...

Browser metrics Passed 4 tests

An overview of browser requirements for Universal Voice Search
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,906 ▲17113.38 ▼0.864.90 ▲3.0744.17 ▲0.03
Dashboard /wp-admin2,235 ▲475.99 ▲0.1396.29 ▼18.2180.08 ▲33.29
Posts /wp-admin/edit.php2,118 ▲292.00 ▼0.0034.48 ▼5.4032.63 ▼5.86
Add New Post /wp-admin/post-new.php1,541 ▲820.85 ▼2.12739.94 ▲74.8461.72 ▲13.10
Media Library /wp-admin/upload.php1,417 ▲294.15 ▼0.0493.63 ▼7.8171.63 ▲25.88
Universal Voice Search /wp-admin/options-general.php?page=universal-voice-search-settings1,7362.0528.6148.06

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure has failed, leaving 14 options in the database
    • theysaidso_admin_options
    • uvs_settings_updated_timestamp
    • uvs_api_system_key
    • uvs_floating_mic_position
    • widget_recent-posts
    • uvs_uuid
    • uvs_selected_language
    • can_compress_scripts
    • widget_theysaidso_widget
    • uvs_mic_listening_timeout
    • ...

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Tags: There are too many tags (11 tag instead of maximum 10)
The official readme.txt might help

universal-voice-search/universal-voice-search.php Passed 13 tests

The main PHP script in "Universal Voice Search" version 3.1.2 is automatically included on every request by WordPress
61 characters long description:
Allows any serach box on the page to be searchable via voice.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin6,873 lines of code in 37 files:
LanguageFilesBlank linesComment linesLines of code
PHP103634484,127
JavaScript144694351,882
CSS414936717
SVG71292
PO File17939
JSON10016

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in 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 methods2032.26%
▷ 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

Using a strong compression for your PNG files is a great way to speed-up 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%