78% play-ht

Code Review | Play.ht - Make Your Blog Posts Accessible With Text to Speech Audio

WordPress plugin Play.ht - Make Your Blog Posts Accessible With Text to Speech Audio scored 78% from 54 tests.

About plugin

  • Plugin page: play-ht
  • Plugin version: 3.6.4
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.2
  • WordPress version: 6.3.1
  • First release: Jun 22, 2017
  • Latest release: Jun 15, 2023
  • Number of updates: 206
  • Update frequency: every 10.6 days
  • Top authors: hammadh (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

1,000+ active / 42,159 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.68MB] [CPU: ▲4.91ms] Passed 4 tests

This is a short check of server-side resources used by Play.ht - Make Your Blog Posts Accessible With Text to Speech Audio
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.08 ▲0.6246.03 ▼1.66
Dashboard /wp-admin4.00 ▲0.6955.01 ▲3.69
Posts /wp-admin/edit.php4.08 ▲0.7256.98 ▲12.46
Add New Post /wp-admin/post-new.php6.62 ▲0.7499.24 ▲13.68
Media Library /wp-admin/upload.php3.92 ▲0.6942.60 ▲5.15

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 96 new files
Database: no new tables, 13 new options
New WordPress options
theysaidso_admin_options
playHt_articleplayer_switch
db_upgraded
playht_Listenbutton_switch
widget_recent-posts
widget_theysaidso_widget
playHtDarkMode
playht_upgrade_342
can_compress_scripts
playht_type_switch
...

Browser metrics Passed 4 tests

An overview of browser requirements for Play.ht - Make Your Blog Posts Accessible With Text to Speech Audio
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,855 ▲10914.25 ▲0.021.77 ▼0.2944.43 ▲0.95
Dashboard /wp-admin2,235 ▲475.88 ▲0.02131.02 ▲10.3244.26 ▼3.61
Posts /wp-admin/edit.php2,321 ▲2324.83 ▲2.78197.58 ▲160.3939.09 ▲5.20
Add New Post /wp-admin/post-new.php6,511 ▲4,99222.45 ▼0.601,034.08 ▲383.3538.99 ▼16.18
Media Library /wp-admin/upload.php1,529 ▲1386.72 ▲2.54126.73 ▲25.4443.21 ▼1.76

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
  • Zombie WordPress options detected upon uninstall: 13 options
    • playHt_articleplayer_switch
    • playht_button_switch
    • can_compress_scripts
    • theysaidso_admin_options
    • playht_type_switch
    • db_upgraded
    • playHtDarkMode
    • widget_recent-comments
    • playht_listen_button_type
    • playht_upgrade_342
    • ...

Smoke tests 50% 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 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
Please fix the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/play-ht/views/back-end/notice.php
  • 16× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/play-ht/views/front-end/podcast_iframe.php:2
    • > PHP Warning
      Use of undefined constant WPPP_URI - assumed 'WPPP_URI' (this will throw an Error in a future version of PHP) in wp-content/plugins/play-ht/views/back-end/play_main_view.php on line 5
    • > PHP Fatal error
      Uncaught Error: Class 'Wordpress\\Play\\Component' not found in wp-content/plugins/play-ht/includes/classes/class-asset-handler.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/play-ht/views/back-end/crisp_chat.php:1
    • > PHP Notice
      Undefined variable: notice_text in wp-content/plugins/play-ht/views/back-end/notice.php on line 2
    • > PHP Warning
      Use of undefined constant WPPP_URI - assumed 'WPPP_URI' (this will throw an Error in a future version of PHP) in wp-content/plugins/play-ht/views/back-end/main_view_subscribed.php on line 5
    • > PHP Fatal error
      Uncaught Error: Class 'Wordpress\\Play\\Component' not found in wp-content/plugins/play-ht/admin/classes/class-post-type-admin-actions.php:10
    • > PHP Notice
      Undefined variable: dismiss in wp-content/plugins/play-ht/views/back-end/notice.php on line 1
    • > PHP Fatal error
      Uncaught Error: Class 'Wordpress\\Play\\Component' not found in wp-content/plugins/play-ht/includes/classes/Play_Admin_notice.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Wordpress\\Play\\Component' not found in wp-content/plugins/play-ht/includes/classes/Play_Requests.php:5

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 90% from 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
8 plugin tags: podcast, text to audio, accessibility, seo, voice over...

play-ht/init.php 77% from 13 tests

The primary PHP file in "Play.ht - Make Your Blog Posts Accessible With Text to Speech Audio" version 3.6.4 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("play-ht.php" instead of "init.php")
  • Domain Path: The domain path points to an invalid folder, "/language" does not exist
  • Description: The description should be shorter than 140 characters (currently 190 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin3,786 lines of code in 65 files:
LanguageFilesBlank linesComment linesLines of code
PHP418669763,651
SVG3292110
JavaScript170017
JSON1005
CSS3003

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity13.91
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity2.88
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes23
▷ Abstract classes00.00%
▷ Concrete classes23100.00%
▷ Final classes28.70%
Methods159
▷ Static methods3622.64%
▷ Public methods13081.76%
▷ Protected methods1911.95%
▷ Private methods106.29%
Functions57
▷ Named functions5698.25%
▷ Anonymous functions11.75%
Constants13
▷ Global constants1292.31%
▷ Class constants17.69%
▷ 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
20 PNG files occupy 0.20MB with 0.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/pause-btn.png1.80KB1.52KB▼ 15.70%
assets/images/audio-grey.png1.64KB1.51KB▼ 8.10%
assets/images/profile-icon.png2.47KB2.50KB0.00%
assets/images/mobile_page_player.png16.13KB0.72KB▼ 95.53%
assets/images/pageplayer_placeholder.png106.96KB30.78KB▼ 71.22%