10% youtu-cdn

Code Review | YouTu-CDN

WordPress plugin YouTu-CDN scored 10% from 54 tests.

About plugin

  • Plugin page: youtu-cdn
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.3
  • WordPress version: 5.8.1
  • First release: Aug 29, 2015
  • Latest release: Aug 29, 2015
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: AllRight (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 480 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The following installer errors require your attention
  • This plugin did not install gracefully
    • > Notice in wp-content/plugins/youtu-cdn/inc/functions/conf.php+16
    Undefined variable: secretid

Server metrics [RAM: ▼1.81MB] [CPU: ▼187.33ms] Passed 4 tests

Analyzing server-side resources used by YouTu-CDN
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /1.82 ▼0.905.84 ▼16.95
Dashboard /wp-admin1.84 ▼1.226.91 ▼33.32
Posts /wp-admin/edit.php1.84 ▼1.278.50 ▼33.04
Add New Post /wp-admin/post-new.php1.84 ▼3.597.00 ▼650.62
Media Library /wp-admin/upload.php1.84 ▼1.176.39 ▼32.35
操作日志 /wp-admin/admin.php?page=youtu-log1.847.51
优图直传 /wp-admin/admin.php?page=youtu-other1.847.03
接口设置 /wp-admin/admin.php?page=YouTu-CDN1.847.74
图片管理 /wp-admin/admin.php?page=youtu-manage1.846.55

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 10 new files
Database: 2 new tables, no new options
New tables
wp_youtu
wp_youtulog

Browser metrics Passed 4 tests

A check of browser resources used by YouTu-CDN
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,757 ▲16116.02 ▲0.429.89 ▼0.5952.43 ▼1.52
Dashboard /wp-admin3,017 ▲865.93 ▼0.16139.25 ▲2.93118.14 ▲9.37
Posts /wp-admin/edit.php2,783 ▲442.72 ▲0.0060.90 ▼5.3591.15 ▲3.80
Add New Post /wp-admin/post-new.php1,632 ▲1718.78 ▼2.72384.50 ▲111.77104.56 ▼8.98
Media Library /wp-admin/upload.php1,854 ▲1065.07 ▲0.06147.91 ▼2.13126.79 ▼0.69
操作日志 /wp-admin/admin.php?page=youtu-log1,1192.0852.18103.67
优图直传 /wp-admin/admin.php?page=youtu-other1,1542.1052.38106.57
接口设置 /wp-admin/admin.php?page=YouTu-CDN1,3522.1859.51138.85
图片管理 /wp-admin/admin.php?page=youtu-manage1,1322.0950.35105.20

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/youtu-cdn/inc/functions/conf.php+16
    Undefined variable: secretid
  • Zombie tables detected upon uninstall: 2 tables
    • wp_youtu
    • wp_youtulog

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=youtu-manage
    • > Notice in wp-content/plugins/youtu-cdn/inc/functions/conf.php+16
    Undefined variable: secretid
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=youtu-manage
    • > Notice in wp-content/plugins/youtu-cdn/inc/functions/conf.php+18
    Undefined variable: secretkey
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=youtu-manage
    • > Notice in wp-content/plugins/youtu-cdn/inc/functions/conf.php+20
    Undefined variable: appid
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=youtu-manage
    • > Notice in wp-content/plugins/youtu-cdn/inc/functions/conf.php+22
    Undefined variable: bucket
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=youtu-manage
    • > Notice in wp-content/plugins/youtu-cdn/inc/functions/conf.php+24
    Undefined variable: baseurl
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=youtu-manage
    • > Notice in wp-content/plugins/youtu-cdn/inc/manage.php+4
    Undefined index: action
  • 18 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=YouTu-CDN
    • > Notice in wp-content/plugins/youtu-cdn/inc/setting.php+104
    Trying to access array offset on value of type bool

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
No output text or server-side errors detected on direct access of PHP files

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following user-side errors
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=youtu-manage
    • > Network (severe)
    wp-content/plugins/youtu-cdn/inc/js/youtu.js - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
2 plugin tags: youtu, youtu-cdn

youtu-cdn/wp-youtu.php 92% from 13 tests

"YouTu-CDN" version 1.1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("youtu-cdn.php" instead of "wp-youtu.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
Everything looks great! No dangerous files found in this plugin946 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP83357919
JavaScript10027

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity15.00
▷ Minimum class complexity15.00
▷ Maximum class complexity15.00
Average method complexity8.00
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods2100.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions30
▷ Named functions30100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin