10% webspeechapi-for-wp

Code Review | WebSpeechAPI for WP

WordPress plugin WebSpeechAPI for WP scored 10% from 54 tests.

About plugin

  • Plugin page: webspeechapi-for-wp
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-4.8.1
  • WordPress version: 6.3.1
  • First release: Feb 20, 2018
  • Latest release: Apr 17, 2018
  • Number of updates: 5
  • Update frequency: every 11.4 days
  • Top authors: yuonoda (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active / 7,604 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
These installer errors require your attention
  • The plugin cannot be installed
    • > Warning in wp-content/plugins/webspeechapi-for-wp/webspeechapi.php+41
    Use of undefined constant wsapiwp_voice_btn_title_bottom - assumed 'wsapiwp_voice_btn_title_bottom' (this will throw an Error in a future version of PHP)

Server metrics [RAM: ▼1.94MB] [CPU: ▼52.86ms] Passed 4 tests

Analyzing server-side resources used by WebSpeechAPI for WP
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.04 ▼1.423.90 ▼36.37
Dashboard /wp-admin2.06 ▼1.245.74 ▼44.10
Posts /wp-admin/edit.php2.07 ▼1.297.59 ▼34.69
Add New Post /wp-admin/post-new.php2.07 ▼3.826.18 ▼96.26
Media Library /wp-admin/upload.php2.07 ▼1.164.95 ▼27.71

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for WebSpeechAPI for WP
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.20 ▼1.184.51 ▲2.5443.68 ▼0.81
Dashboard /wp-admin2,210 ▲254.88 ▼0.9799.64 ▼1.5136.20 ▼9.81
Posts /wp-admin/edit.php2,093 ▲42.03 ▲0.0236.72 ▼2.4932.01 ▲1.42
Add New Post /wp-admin/post-new.php1,518 ▼023.21 ▲0.16577.24 ▼50.5876.33 ▲16.55
Media Library /wp-admin/upload.php1,386 ▲14.21 ▼0.1499.16 ▼10.2241.01 ▼5.52

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin cannot be uninstalled
    • > Warning in wp-content/plugins/webspeechapi-for-wp/webspeechapi.php+41
    Use of undefined constant wsapiwp_voice_btn_title_bottom - assumed 'wsapiwp_voice_btn_title_bottom' (this will throw an Error in a future version of PHP)
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% 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× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/webspeechapi-for-wp/webspeechapi.php:18

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Donate link: Please fix this invalid url: ""
You can take inspiration from this readme.txt

webspeechapi-for-wp/webspeechapi.php 92% from 13 tests

Analyzing the main PHP file in "WebSpeechAPI for WP" version 1.1
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("webspeechapi-for-wp.php" instead of "webspeechapi.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin107 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript110262
PHP161224
CSS11021

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.00
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected