84% themes4wp-youtube-external-subtitles

Code Review | Themes4WP YouTube External Subtitles

WordPress plugin Themes4WP YouTube External Subtitles scored84%from 54 tests.

About plugin

  • Plugin page: themes4wp-youtube...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.5
  • WordPress version: 6.3.1
  • First release: May 25, 2016
  • Latest release: May 25, 2016
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: themes4wp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /1,403 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼11.26ms] Passed 4 tests

A check of server-side resources used by Themes4WP YouTube External Subtitles
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0132.97 ▼7.06
Dashboard /wp-admin3.32 ▼0.0345.92 ▼12.47
Posts /wp-admin/edit.php3.37 ▲0.0148.40 ▼0.02
Add New Post /wp-admin/post-new.php5.90 ▲0.0185.83 ▼24.65
Media Library /wp-admin/upload.php3.24 ▲0.0134.42 ▼0.87

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Themes4WP YouTube External Subtitles
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.59 ▼1.161.55 ▼0.2945.40 ▲3.66
Dashboard /wp-admin2,206 ▲185.90 ▼0.01109.52 ▼2.7441.95 ▲0.75
Posts /wp-admin/edit.php2,086 ▼32.00 ▼0.0639.61 ▼1.3334.10 ▼1.18
Add New Post /wp-admin/post-new.php1,547 ▲2818.46 ▼4.89647.42 ▼27.4348.00 ▼19.16
Media Library /wp-admin/upload.php1,391 ▲34.14 ▼0.0698.33 ▲1.8442.91 ▲2.31

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 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 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
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/themes4wp-youtube-external-subtitles/twp-youtube-external-subtitles.php:14

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)
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
3 plugin tags: video, youtube, subtitles

themes4wp-youtube-external-subtitles/twp-youtube-external-subtitles.php 85% from 13 tests

The primary PHP file in "Themes4WP YouTube External Subtitles" version 1.0 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("themes4wp-youtube-external-subtitles.php" instead of "twp-youtube-external-subtitles.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 161 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected370 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript3845338
PHP2221032

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.06
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There are no PNG files in this plugin