84% text-to-speech-widget

Code Review | Text To Speech Widget

WordPress plugin Text To Speech Widget scored84%from 54 tests.

About plugin

  • Plugin page: text-to-speech-wi...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-4.7
  • WordPress version: 6.3.1
  • First release: Nov 29, 2016
  • Latest release: Dec 2, 2016
  • Number of updates: 5
  • Update frequency: every 1.4 days
  • Top authors: pmbaldha (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

50+ active /3,727 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.00MB] [CPU: ▼4.71ms] Passed 4 tests

Server-side resources used by Text To Speech Widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.07 ▼5.29
Dashboard /wp-admin3.31 ▼0.0353.74 ▼10.26
Posts /wp-admin/edit.php3.36 ▲0.0150.75 ▲1.17
Add New Post /wp-admin/post-new.php5.89 ▲0.0195.80 ▼3.41
Media Library /wp-admin/upload.php3.24 ▲0.0133.01 ▲0.14

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_ttsw_widget
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Text To Speech Widget
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.28 ▼1.022.08 ▲0.0642.67 ▲0.01
Dashboard /wp-admin2,203 ▲155.80 ▼0.1497.44 ▼22.8539.00 ▼6.04
Posts /wp-admin/edit.php2,092 ▲31.99 ▲0.0039.50 ▲2.7234.23 ▲2.14
Add New Post /wp-admin/post-new.php1,514 ▼2217.55 ▼5.56640.48 ▼42.8154.37 ▲0.44
Media Library /wp-admin/upload.php1,388 ▲34.21 ▼0.0397.03 ▼14.0042.01 ▼6.39

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
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • can_compress_scripts
    • widget_ttsw_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

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
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/text-to-speech-widget/text-to-speech-widget.php:17

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 Passed 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
8 plugin tags: text to speech, male voice, male speech, voice, female speech...

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

"Text To Speech Widget" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
87 characters long description:
WP Text To Speech Widget converts any text in to speech in selected language and voice.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected157 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript20785
PHP1154360
CSS11112

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.10
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity2.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%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin