84% dictation-speech-recognition

Code Review | Dictation (Speech Recognition)

WordPress plugin Dictation (Speech Recognition) scored84%from 54 tests.

About plugin

  • Plugin page: dictation-speech-...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-3.8
  • WordPress version: 6.3.1
  • First release: Jan 3, 2014
  • Latest release: Jan 3, 2014
  • Number of updates: 9
  • Update frequency: every 0.1 days
  • Top authors: gearinvent (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /2,948 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
Install script ran successfully

Server metrics [RAM: ▼0.21MB] [CPU: ▼17.36ms] Passed 4 tests

A check of server-side resources used by Dictation (Speech Recognition)
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0335.56 ▼3.63
Dashboard /wp-admin3.09 ▼0.2227.24 ▼20.67
Posts /wp-admin/edit.php3.22 ▼0.1431.14 ▼19.95
Add New Post /wp-admin/post-new.php5.47 ▼0.4264.28 ▼20.47
Media Library /wp-admin/upload.php3.17 ▼0.0626.66 ▼8.36

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

Dictation (Speech Recognition): an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲8113.25 ▼1.054.53 ▲2.8839.29 ▼3.57
Dashboard /wp-admin2,206 ▲155.80 ▲0.8797.51 ▼3.5940.74 ▼2.38
Posts /wp-admin/edit.php2,091 ▼12.00 ▼0.0133.65 ▼7.0333.94 ▼1.46
Add New Post /wp-admin/post-new.php6,255 ▲4,74121.90 ▲4.31994.47 ▲325.6572.48 ▲18.58
Media Library /wp-admin/upload.php1,388 ▼34.17 ▼0.1399.13 ▲2.5240.64 ▼1.57

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 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 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
Please fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'Dictation' not found in wp-content/plugins/dictation-speech-recognition/forms/dictation.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/dictation-speech-recognition/dictation.php:34

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 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Screenshots: Add an image for screenshot #1 (Main screen)
The official readme.txt is a good inspiration

dictation-speech-recognition/dictation.php 92% from 13 tests

"Dictation (Speech Recognition)" version 1.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("dictation-speech-recognition.php" instead of "dictation.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin182 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP25137135
PO File161031
JavaScript1219
CSS22107

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity20.00
▷ Minimum class complexity20.00
▷ Maximum class complexity20.00
Average method complexity2.19
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods16
▷ Static methods743.75%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/rss.png3.26KB0.70KB▼ 78.54%