78% gspeech

Code Review | GSpeech - Text To Speech Audio Solution using Google Translate Technology

WordPress plugin GSpeech - Text To Speech Audio Solution using Google Translate Technology scored78%from 54 tests.

About plugin

  • Plugin page: gspeech
  • Plugin version: 3.1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.4.1
  • WordPress version: 6.3.1
  • First release: Feb 18, 2013
  • Latest release: Nov 9, 2023
  • Number of updates: 569
  • Update frequency: every 6.9 days
  • Top authors: creative-solutions (73.99%)2glux (26.19%)

Code review

54 tests

User reviews

36 reviews

Install metrics

1,000+ active /40,007 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.19MB] [CPU: ▲0.32ms] Passed 4 tests

Server-side resources used by GSpeech - Text To Speech Audio Solution using Google Translate Technology
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.81 ▲0.3548.73 ▲2.97
Dashboard /wp-admin3.48 ▲0.1852.10 ▲5.04
Posts /wp-admin/edit.php3.59 ▲0.2353.16 ▲2.74
Add New Post /wp-admin/post-new.php6.06 ▲0.1890.71 ▼8.74
Media Library /wp-admin/upload.php3.41 ▲0.1841.14 ▲4.31

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 178 new files
Database: 1 new table, 7 new options
New tables
wp_gspeech_data
New WordPress options
widget_recent-comments
db_upgraded
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
wpgs_db_processed
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for GSpeech - Text To Speech Audio Solution using Google Translate Technology
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,245 ▲48313.74 ▼0.9829.20 ▲27.6041.59 ▼3.96
Dashboard /wp-admin2,198 ▲215.56 ▼0.0385.01 ▼5.6276.40 ▲32.26
Posts /wp-admin/edit.php2,118 ▲181.95 ▼0.0635.10 ▼2.4331.86 ▼4.33
Add New Post /wp-admin/post-new.php1,552 ▲2623.28 ▼0.04739.55 ▲70.3454.73 ▼10.38
Media Library /wp-admin/upload.php1,415 ▲184.14 ▼0.0893.57 ▼8.3372.04 ▲28.92

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 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
Almost there! Just fix the following items
  • 17× PHP files output text when accessed directly (only 10 are shown):
    • > /wp-content/plugins/gspeech/includes/admin-page.php
    • > /wp-content/plugins/gspeech/includes/tab_widgets.php
    • > /wp-content/plugins/gspeech/includes/scripts.php
    • > /wp-content/plugins/gspeech/includes/tab_widget.php
    • > /wp-content/plugins/gspeech/includes/tab_audio.php
    • > /wp-content/plugins/gspeech/includes/tab_analytics.php
    • > /wp-content/plugins/gspeech/includes/tab1.php
    • > /wp-content/plugins/gspeech/includes/tab2.php
    • > /wp-content/plugins/gspeech/includes/tab_videos.php
    • > /wp-content/plugins/gspeech/includes/admin/gs_ajax.php
  • 7× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Notice
      Undefined index: q in wp-content/plugins/gspeech/streamer.php on line 8
    • > PHP Notice
      Undefined index: l in wp-content/plugins/gspeech/streamer.php on line 16
    • > PHP Notice
      Undefined variable: type in wp-content/plugins/gspeech/streamer.php on line 40
    • > PHP Notice
      Undefined index: token in wp-content/plugins/gspeech/streamer.php on line 17
    • > PHP Notice
      Undefined index: tr_tool in wp-content/plugins/gspeech/streamer.php on line 18
    • > PHP Notice
      Undefined variable: url in wp-content/plugins/gspeech/streamer.php on line 29
    • > PHP Notice
      Undefined variable: url in wp-content/plugins/gspeech/streamer.php on line 30

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

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
5 plugin tags: text to audio, audio player, accessibility, tts, text to speech

gspeech/gspeech.php 92% from 13 tests

"GSpeech - Text To Speech Audio Solution using Google Translate Technology" version 3.1.4'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:
  • Description: Keep the plugin description shorter than 140 characters (currently 193 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected19,983 lines of code in 47 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript142,2774179,925
CSS8369965,588
PHP18485574,450
SVG70020

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.37
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%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
123 PNG files occupy 0.92MB with 0.58MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/images/16/speaker21.png2.93KB0.39KB▼ 86.64%
includes/css/ui-lightness/images/ui-icons_ffffff_256x240.png6.15KB4.17KB▼ 32.13%
includes/images/32/speaker3.png2.11KB1.35KB▼ 35.99%
includes/images/16/speaker12.png3.29KB0.70KB▼ 78.73%
includes/images/16/speaker4.png3.41KB0.76KB▼ 77.77%