94% webvtt

Code Review | WebVTT

WordPress plugin WebVTT scored 94% from 54 tests.

About plugin

  • Plugin page: webvtt
  • Plugin version: 1.3.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6.0-4.9
  • WordPress version: 5.8.1
  • First release: Aug 19, 2015
  • Latest release: Dec 4, 2017
  • Number of updates: 20
  • Update frequency: every 42.0 days
  • Top authors: bobbywalters (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 1,183 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼152.58ms] Passed 4 tests

Analyzing server-side resources used by WebVTT
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.0140.66 ▲3.57
Dashboard /wp-admin3.07 ▲0.0135.43 ▼45.37
Posts /wp-admin/edit.php3.15 ▲0.0548.02 ▼7.82
Add New Post /wp-admin/post-new.php5.43 ▼0.0191.32 ▼555.18
Media Library /wp-admin/upload.php3.01 ▲0.0129.93 ▼1.95

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: 9 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for WebVTT
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲10716.06 ▲0.5410.43 ▼2.2147.41 ▼3.22
Dashboard /wp-admin2,973 ▲425.88 ▼0.08133.67 ▼44.15107.57 ▼26.31
Posts /wp-admin/edit.php2,736 ▼32.72 ▲0.0259.00 ▼16.8193.23 ▼1.32
Add New Post /wp-admin/post-new.php1,872 ▲219.25 ▼0.20376.89 ▼18.34105.94 ▼2.58
Media Library /wp-admin/upload.php1,812 ▲25.02 ▼0.00150.53 ▲4.10123.72 ▲10.14

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
This plugin's uninstaller ran successfully

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/webvtt/webvtt.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration Passed 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
4 plugin tags: track, video, webvtt, html5

webvtt/webvtt.php Passed 13 tests

The main file in "WebVTT" v. 1.3.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
37 characters long description:
Add HTML5 text track files to videos.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin543 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP386249345
JavaScript2384164
PO File18834

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity26.00
▷ Minimum class complexity13.00
▷ Maximum class complexity39.00
Average method complexity4.33
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods1493.33%
▷ Protected methods16.67%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG files were detected