84% tts-engine-post-to-speech

Code Review | TTS Engine Post to Speech

WordPress plugin TTS Engine Post to Speech scored84%from 54 tests.

About plugin

  • Plugin page: tts-engine-post-t...
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-3.5.1
  • WordPress version: 6.3.1
  • First release: Mar 15, 2013
  • Latest release: May 9, 2013
  • Number of updates: 20
  • Update frequency: every 2.8 days
  • Top authors: anthonymccourt (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

20+ active /5,460 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.07MB] [CPU: ▼2.09ms] Passed 4 tests

Server-side resources used by TTS Engine Post to Speech
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0844.36 ▲6.21
Dashboard /wp-admin3.37 ▲0.0746.98 ▼1.86
Posts /wp-admin/edit.php3.43 ▲0.0746.63 ▼2.96
Add New Post /wp-admin/post-new.php5.96 ▲0.0786.99 ▼0.10
Media Library /wp-admin/upload.php3.30 ▲0.0734.57 ▼3.45
TTS Engine Menu /wp-admin/options-general.php?page=ttsengine-settings3.2633.85

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 15 new files
Database: no new tables, 7 new options
New WordPress options
ttsengine_version
widget_recent-posts
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for TTS Engine Post to Speech
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,949 ▲21413.69 ▼0.8913.93 ▲12.2737.67 ▼3.28
Dashboard /wp-admin2,210 ▲224.85 ▼0.01105.57 ▲3.7339.88 ▼0.77
Posts /wp-admin/edit.php2,093 ▲42.00 ▼0.0235.34 ▼1.2532.80 ▼5.10
Add New Post /wp-admin/post-new.php1,545 ▲3118.38 ▲0.78617.78 ▼108.0256.43 ▼1.42
Media Library /wp-admin/upload.php1,392 ▲74.16 ▼0.0295.00 ▼4.3840.41 ▼5.80
TTS Engine Menu /wp-admin/options-general.php?page=ttsengine-settings1,0122.0524.4959.93

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% 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 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 10× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/tts-engine-post-to-speech/tts-engine.php:27
    • > PHP Notice
      Undefined index: abspath in wp-content/plugins/tts-engine-post-to-speech/tts-engine-get-iOS6-url.php on line 8
    • > PHP Warning
      require_once(wp-load.php): failed to open stream: No such file or directory in wp-content/plugins/tts-engine-post-to-speech/tts-engine-get-iOS6-url.php on line 9
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-load.php' (include_path='.:/usr/share/php') in wp-content/plugins/tts-engine-post-to-speech/tts-engine-get-urls.php on line 8
    • > PHP Warning
      require_once(wp-load.php): failed to open stream: No such file or directory in wp-content/plugins/tts-engine-post-to-speech/tts-engine-get-urls.php on line 8
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-load.php' (include_path='.:/usr/share/php') in wp-content/plugins/tts-engine-post-to-speech/tts-engine-get-iOS6-url.php on line 9
    • > PHP Warning
      require_once(wp-load.php): failed to open stream: No such file or directory in wp-content/plugins/tts-engine-post-to-speech/tts-engine-get-safari-urls.php on line 9
    • > PHP Notice
      Undefined index: abspath in wp-content/plugins/tts-engine-post-to-speech/tts-engine-get-safari-urls.php on line 8
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-load.php' (include_path='.:/usr/share/php') in wp-content/plugins/tts-engine-post-to-speech/tts-engine-get-safari-urls.php on line 9
    • > PHP Notice
      Undefined index: abspath in wp-content/plugins/tts-engine-post-to-speech/tts-engine-get-urls.php on line 7

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

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
10 plugin tags: tts, txt to speech, tts voices, text to talk, text to speak...

tts-engine-post-to-speech/tts-engine.php 92% from 13 tests

The entry point to "TTS Engine Post to Speech" version 2.0 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("tts-engine-post-to-speech.php" instead of "tts-engine.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin1,166 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript2149102657
PHP613194416
CSS117093

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity13.00
▷ Minimum class complexity1.00
▷ Maximum class complexity25.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods16
▷ Static methods16100.00%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png9.50KB4.71KB▼ 50.41%
screenshot-2.png10.16KB5.13KB▼ 49.47%