89% ondoku

Code Review | text-to-speech Ondoku

WordPress plugin text-to-speech Ondoku scored89%from 54 tests.

About plugin

  • Plugin page: ondoku
  • Plugin version: 1.0.21
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-6.0
  • WordPress version: 6.3.1
  • First release: Feb 27, 2021
  • Latest release: Aug 26, 2023
  • Number of updates: 33
  • Update frequency: every 27.6 days
  • Top authors: ondoku3 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /1,744 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.17MB] [CPU: ▼5.66ms] Passed 4 tests

This is a short check of server-side resources used by text-to-speech Ondoku
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.67 ▲0.1738.03 ▼5.32
Dashboard /wp-admin3.52 ▲0.1751.75 ▼1.43
Posts /wp-admin/edit.php3.63 ▲0.2350.79 ▼7.60
Add New Post /wp-admin/post-new.php6.10 ▲0.1790.18 ▼8.29
Media Library /wp-admin/upload.php3.44 ▲0.1736.29 ▲0.11
Ondoku /wp-admin/options-general.php?page=ondokusan_setting_page3.4138.45

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

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

Browser metrics Passed 4 tests

A check of browser resources used by text-to-speech Ondoku
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,801 ▲4014.69 ▲0.411.77 ▼0.3440.39 ▼6.02
Dashboard /wp-admin2,210 ▲305.58 ▼0.0783.41 ▼2.6545.03 ▲3.11
Posts /wp-admin/edit.php2,113 ▲101.95 ▼0.0837.11 ▼6.6936.29 ▼2.28
Add New Post /wp-admin/post-new.php1,531 ▼423.24 ▲5.28686.75 ▲55.0969.73 ▼1.90
Media Library /wp-admin/upload.php1,415 ▲184.20 ▲0.0197.46 ▼9.9448.62 ▲1.41
Ondoku /wp-admin/options-general.php?page=ondokusan_setting_page1,4101.8524.9765.51

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • ondokusan_settings
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
4 plugin tags: speech, text, read, mp3

ondoku/ondokusan.php 77% from 13 tests

"text-to-speech Ondoku" version 1.0.21's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("ondoku.php" instead of "ondokusan.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Description: The description should be shorter than 140 characters (currently 142 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 plugin1,542 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP4110701,132
PO File7115129410

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity17.67
▷ Minimum class complexity14.00
▷ Maximum class complexity23.00
Average method complexity3.38
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods21
▷ Static methods00.00%
▷ Public methods21100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin