10% text-to-speech

Code Review | Text to Speech

WordPress plugin Text to Speech scored10%from 54 tests.

About plugin

  • Plugin page: text-to-speech
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4.2
  • WordPress version: 6.3.1
  • First release: Nov 28, 2012
  • Latest release: Dec 19, 2012
  • Number of updates: 5
  • Update frequency: every 4.2 days
  • Top authors: olarmarius (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,433 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
You still need to fix the following installer errors
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/text-to-speech/text-to-speech.php+54
    Methods with the same name as their class will not be constructors in a future version of PHP; TextToSpeechWidget has a deprecated constructor

Server metrics [RAM: ▼1.81MB] [CPU: ▼55.99ms] Passed 4 tests

Server-side resources used by Text to Speech
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.18 ▼1.284.30 ▼38.92
Dashboard /wp-admin2.20 ▼1.145.95 ▼58.11
Posts /wp-admin/edit.php2.20 ▼1.158.18 ▼35.13
Add New Post /wp-admin/post-new.php2.20 ▼3.685.24 ▼91.81
Media Library /wp-admin/upload.php2.20 ▼1.026.35 ▼30.26
Text to Speech /wp-admin/options-general.php?page=text-to-speech/text-to-speech.php2.206.69

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 13 new options
New WordPress options
widget_recent-posts
widget_texttospeechwidget
tts_amplitude
tts_all_options
tts_workdgap
widget_recent-comments
tts_speed
tts_pitch
theysaidso_admin_options
db_upgraded
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Text to Speech
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,837 ▲9115.32 ▲0.95133.67 ▲131.7936.68 ▼6.02
Dashboard /wp-admin2,213 ▲254.85 ▼0.03101.95 ▼12.2238.91 ▼5.26
Posts /wp-admin/edit.php2,090 ▲12.01 ▼0.0535.94 ▼5.4630.54 ▼7.19
Add New Post /wp-admin/post-new.php1,536 ▲1723.51 ▲0.55618.49 ▼9.4352.13 ▼4.26
Media Library /wp-admin/upload.php1,386 ▲14.24 ▲0.0696.49 ▼5.8442.18 ▼2.01
Text to Speech /wp-admin/options-general.php?page=text-to-speech/text-to-speech.php9622.1722.5532.07

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/text-to-speech/text-to-speech.php+54
    Methods with the same name as their class will not be constructors in a future version of PHP; TextToSpeechWidget has a deprecated constructor
  • This plugin does not fully uninstall, leaving 7 options in the database
    • db_upgraded
    • widget_texttospeechwidget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=text-to-speech/text-to-speech.php
    • > Deprecated in wp-content/plugins/text-to-speech/text-to-speech.php+54
    Methods with the same name as their class will not be constructors in a future version of PHP; TextToSpeechWidget has a deprecated constructor
    • > GET request to /wp-admin/options-general.php?page=text-to-speech/text-to-speech.php
    • > Warning in wp-content/plugins/text-to-speech/text-to-speech.php+13
    Use of undefined constant TTS_TEXTDOMAIN - assumed 'TTS_TEXTDOMAIN' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/options-general.php?page=text-to-speech/text-to-speech.php
    • > Notice in wp-content/plugins/text-to-speech/text-to-speech.php+237
    Undefined index: submit

SRP 50% 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
The following issues need your attention
  • 2× 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/text-to-speech/text-to-speech.php:21
    • > PHP Warning
      Use of undefined constant TTS_TEXTDOMAIN - assumed 'TTS_TEXTDOMAIN' (this will throw an Error in a future version of PHP) in wp-content/plugins/text-to-speech/text-to-speech.php on line 13

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 Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
7 plugin tags: espeak, widget, text, text-to-speech, speak...

text-to-speech/text-to-speech.php Passed 13 tests

The entry point to "Text to Speech" version 1.0 is a PHP file that has certain tags in its header comment area
54 characters long description:
Javascript tool for transforming the text into speech.

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
No dangerous file extensions were detected5,420 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript41245,061
PHP18630299
PO File1233660

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.13
Average class complexity18.00
▷ Minimum class complexity18.00
▷ Maximum class complexity18.00
Average method complexity5.25
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected