84% rapidly-load-youtube

Code Review | Rapidly load YouTube (YouTube高速ローダー)

WordPress plugin Rapidly load YouTube (YouTube高速ローダー) scored84%from 54 tests.

About plugin

  • Plugin page: rapidly-load-youtube
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-4.9
  • WordPress version: 6.3.1
  • First release: Jun 9, 2018
  • Latest release: Jun 20, 2018
  • Number of updates: 4
  • Update frequency: every 3.5 days
  • Top authors: densuke (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /656 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▼0.56ms] Passed 4 tests

This is a short check of server-side resources used by Rapidly load YouTube (YouTube高速ローダー)
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0541.46 ▲4.17
Dashboard /wp-admin3.35 ▲0.0548.76 ▼4.76
Posts /wp-admin/edit.php3.40 ▲0.0454.45 ▲7.75
Add New Post /wp-admin/post-new.php5.93 ▲0.0486.56 ▼4.74
Media Library /wp-admin/upload.php3.27 ▲0.0436.96 ▲3.10
Rapidly load YouTube embedding /wp-admin/tools.php?page=dn_thum_youtube_menu3.2433.67

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Rapidly load YouTube (YouTube高速ローダー)
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,796 ▲3514.42 ▲0.051.50 ▼0.1439.31 ▼0.39
Dashboard /wp-admin2,196 ▲195.51 ▼0.0890.39 ▲1.2440.46 ▼0.15
Posts /wp-admin/edit.php2,101 ▼21.96 ▼0.0139.25 ▲1.2738.08 ▲1.19
Add New Post /wp-admin/post-new.php1,534 ▲623.02 ▼0.02646.41 ▲3.0257.67 ▼2.29
Media Library /wp-admin/upload.php1,404 ▲44.17 ▼0.0896.53 ▼6.8445.36 ▲4.12
Rapidly load YouTube embedding /wp-admin/tools.php?page=dn_thum_youtube_menu8132.0023.7726.67

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
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not 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
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/rapidly-load-youtube/thumbnails-youtube.php:39

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: movie, thumnail, load, rapid, youtube

rapidly-load-youtube/thumbnails-youtube.php 92% from 13 tests

The main PHP file in "Rapidly load YouTube (YouTube高速ローダー)" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("rapidly-load-youtube.php" instead of "thumbnails-youtube.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
No dangerous file extensions were detected232 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP12742125
CSS210059
PO File17225
JavaScript16423

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity13.00
▷ Minimum class complexity13.00
▷ Maximum class complexity13.00
Average method complexity2.20
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods110.00%
▷ Public methods990.00%
▷ Protected methods00.00%
▷ Private methods110.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
2 PNG files occupy 0.08MB with 0.08MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/youtube_social_icon_dark.png41.65KB1.56KB▼ 96.26%
images/youtube_social_icon_red.png41.45KB1.07KB▼ 97.42%