84% wubtitle

Code Review | Wubtitle

WordPress plugin Wubtitle scored84%from 54 tests.

About plugin

  • Plugin page: wubtitle
  • Plugin version: 1.2.4
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.0
  • WordPress version: 6.3.1
  • First release: Jul 25, 2020
  • Latest release: Oct 17, 2022
  • Number of updates: 18
  • Update frequency: every 45.2 days
  • Top authors: giuseppectmobi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /2,032 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.13MB] [CPU: ▼4.93ms] Passed 4 tests

An overview of server-side resources used by Wubtitle
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1340.26 ▼3.55
Dashboard /wp-admin3.43 ▲0.1352.58 ▲3.76
Posts /wp-admin/edit.php3.48 ▲0.1248.30 ▼6.85
Add New Post /wp-admin/post-new.php6.05 ▲0.1689.62 ▼9.56
Media Library /wp-admin/upload.php3.35 ▲0.1336.26 ▲0.26
All transcripts /wp-admin/edit.php?post_type=transcript3.4036.57
Add new /wp-admin/post-new.php?post_type=transcript6.0484.59

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Wubtitle
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,861 ▲11113.34 ▼1.044.43 ▲2.7442.60 ▲1.18
Dashboard /wp-admin2,267 ▲674.86 ▼0.0796.36 ▼9.5638.56 ▼17.43
Posts /wp-admin/edit.php2,143 ▲402.01 ▲0.0435.86 ▼8.1633.80 ▼3.11
Add New Post /wp-admin/post-new.php6,424 ▲4,89228.86 ▲5.64909.90 ▲232.4935.67 ▼9.92
Media Library /wp-admin/upload.php1,461 ▲644.87 ▲0.61110.27 ▼5.9044.14 ▼3.66
All transcripts /wp-admin/edit.php?post_type=transcript1,1121.9330.2830.93
Add new /wp-admin/post-new.php?post_type=transcript1,50316.91854.4331.00

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded

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
The smoke test was a success, however most plugin functionality was not tested

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 fix the following
  • 18× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Warning
      require(WUBTITLE_DIRincludes/Dashboard/Templates/plans_array.php): failed to open stream: No such file or directory in wp-content/plugins/wubtitle/includes/Dashboard/Templates/downgrade_plan_template.php on line 13
    • > PHP Fatal error
      require(): Failed opening required 'WUBTITLE_DIRincludes/Dashboard/Templates/plans_array.php' (include_path='.:/usr/share/php') in wp-content/plugins/wubtitle/includes/Dashboard/Templates/upgrade_plan_template.php on line 13
    • > PHP Warning
      Use of undefined constant WUBTITLE_DIR - assumed 'WUBTITLE_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/wubtitle/includes/Dashboard/Templates/cancel_template.php on line 17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/wubtitle/includes/Dashboard/Templates/thankyou_page.php:25
    • > PHP Warning
      Use of undefined constant WUBTITLE_DIR - assumed 'WUBTITLE_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/wubtitle/includes/Dashboard/Templates/upgrade_plan_template.php on line 13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_cache_delete() in wp-content/plugins/wubtitle/includes/Dashboard/Templates/update_template.php:17
    • > PHP Warning
      require(WUBTITLE_DIRincludes/Dashboard/Templates/plans_array.php): failed to open stream: No such file or directory in wp-content/plugins/wubtitle/includes/Dashboard/Templates/upgrade_plan_template.php on line 13
    • > PHP Warning
      require(WUBTITLE_DIRincludes/Dashboard/Templates/plans_array.php): failed to open stream: No such file or directory in wp-content/plugins/wubtitle/includes/Dashboard/Templates/payment_template.php on line 17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_cache_delete() in wp-content/plugins/wubtitle/includes/Dashboard/Templates/plans_array.php:14
    • > PHP Fatal error
      Uncaught Error: Interface 'Wubtitle\\Core\\VideoSource' not found in wp-content/plugins/wubtitle/includes/Core/Sources/Vimeo.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Tags: Please delete some tags, you are using 13 tag instead of maximum 10
You can look at the official readme.txt

wubtitle/wubtitle.php Passed 13 tests

This is the main PHP file of "Wubtitle" version 1.2.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
48 characters long description:
Automatically generates subtitle for your videos

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin271,119 lines of code in 7,213 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript4,23030,10352,120196,020
TypeScript2,8282,17014,82363,779
PHP565582,0374,696
Markdown291,30102,329
JSON38001,782
CSS8270141,472
PO File1414565877
XML60084
Bourne Shell28032
Nix11019
YAML21211
SVG9009
make1407
HTML2002

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity13.26
▷ Minimum class complexity1.00
▷ Maximum class complexity73.00
Average method complexity3.36
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces12
Interfaces1
Traits0
Classes38
▷ Abstract classes00.00%
▷ Concrete classes38100.00%
▷ Final classes00.00%
Methods211
▷ Static methods4119.43%
▷ Public methods19090.05%
▷ Protected methods00.00%
▷ Private methods219.95%
Functions9
▷ Named functions111.11%
▷ Anonymous functions888.89%
Constants13
▷ Global constants1076.92%
▷ Class constants323.08%
▷ Public constants3100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
4 PNG files occupy 3.12MB with 1.99MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
.wordpress-org/screenshot-2.png564.48KB218.97KB▼ 61.21%
.wordpress-org/screenshot-3.png643.01KB221.53KB▼ 65.55%
.wordpress-org/screenshot-4.png1,366.69KB415.71KB▼ 69.58%
.wordpress-org/screenshot-1.png617.05KB249.30KB▼ 59.60%