73% ytlink

Code Review | ytlink

WordPress plugin ytlink scored73%from 54 tests.

About plugin

  • Plugin page: ytlink
  • Plugin version: 0.9.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.5.1
  • WordPress version: 6.3.1
  • First release: Mar 7, 2013
  • Latest release: Apr 1, 2013
  • Number of updates: 44
  • Update frequency: every 0.6 days
  • Top authors: xundeenergie (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,923 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
Installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼4.52ms] Passed 4 tests

This is a short check of server-side resources used by ytlink
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0641.25 ▼2.88
Dashboard /wp-admin3.39 ▲0.0449.93 ▼16.55
Posts /wp-admin/edit.php3.45 ▲0.0956.22 ▲3.06
Add New Post /wp-admin/post-new.php5.99 ▲0.1094.62 ▲2.50
Media Library /wp-admin/upload.php3.32 ▲0.0841.46 ▼1.14
Youtube-Link /wp-admin/options-general.php?page=ytlink3.4233.49

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 24 new files
Database: no new tables, 39 new options
New WordPress options
fso
fsre
arrowcol
widget_theysaidso_widget
ilink
videobox
ico_x
pp_settings_def
widget_recent-comments
widget_recent-posts
...

Browser metrics Passed 4 tests

An overview of browser requirements for ytlink
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲5113.36 ▼1.261.62 ▲0.1442.63 ▼0.67
Dashboard /wp-admin2,218 ▲415.82 ▲0.1696.57 ▲4.1645.32 ▲5.18
Posts /wp-admin/edit.php2,119 ▲192.40 ▲0.3942.66 ▲1.4741.28 ▲5.71
Add New Post /wp-admin/post-new.php1,552 ▲2418.39 ▼4.66627.89 ▼33.2846.49 ▼8.25
Media Library /wp-admin/upload.php1,434 ▲344.47 ▲0.2595.05 ▼6.3041.62 ▼7.73
Youtube-Link /wp-admin/options-general.php?page=ytlink1,6512.6251.0645.85

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=ytlink
    • > Notice in wp-content/plugins/ytlink/tab1.php+24
    Undefined variable: x
    • > GET request to /wp-admin/options-general.php?page=ytlink
    • > Notice in wp-content/plugins/ytlink/tab1.php+25
    Undefined variable: y
    • > GET request to /wp-admin/options-general.php?page=ytlink
    • > Notice in wp-content/plugins/ytlink/tab1.php+26
    Undefined variable: ppic
    • > GET request to /wp-admin/options-general.php?page=ytlink
    • > Notice in wp-content/plugins/ytlink/tab1.php+27
    Undefined variable: tit
    • > GET request to /wp-admin/options-general.php?page=ytlink
    • > Warning in wp-content/plugins/ytlink/tab1.php+35
    Use of undefined constant h - assumed 'h' (this will throw an Error in a future version of PHP)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=ytlink
    • > Notice in wp-content/plugins/ytlink/preview.php+54
    A non well formed numeric value encountered

SRP 0% from 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
Almost there! Just fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/ytlink/arrow.php
  • 16× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/ytlink/tab3.php:2
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/ytlink/preview.php on line 10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function update_option() in wp-content/plugins/ytlink/preview.php:14
    • > PHP Notice
      Undefined variable: pfeil in wp-content/plugins/ytlink/preview.php on line 12
    • > PHP Notice
      Undefined variable: ppic in wp-content/plugins/ytlink/preview.php on line 9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/ytlink/tab5.php:2
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/ytlink/tab1.php on line 16
    • > PHP Notice
      Undefined index: color in wp-content/plugins/ytlink/arrow.php on line 25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/ytlink/tab2.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/ytlink/tab1.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

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
Please fix the following attributes:
  • Plugin Name: You should set the name of your plugin on the first line ( === ytlink === )
Please take inspiration from this readme.txt

ytlink/ytlink.php Passed 13 tests

The principal PHP file in "ytlink" v. 0.9.2 is loaded by WordPress automatically on each request
88 characters long description:
Erzeugt einen Link mit Vorschaubild aus einem Shortcode nur mit der Video-ID für Youtub

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected1,642 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP10171951,046
PO File4254547581
JavaScript12715

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.14
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%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.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
5 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/video-button-transp.png31.07KB14.87KB▼ 52.15%
images/filmstreifen-rechts.png0.83KB0.65KB▼ 21.28%
images/filmstreifen-links.png0.83KB0.65KB▼ 21.37%
images/filmstreifen-unten.png0.83KB0.65KB▼ 20.99%
images/filmstreifen-oben.png0.62KB0.63KB0.00%