74% youtube-profile-field

Code Review | Youtube Profile Field

WordPress plugin Youtube Profile Field scored 74% from 54 tests.

About plugin

  • Plugin page: youtube-profile-f...
  • Plugin version: 3.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.4
  • WordPress version: 5.8.1
  • First release: Aug 9, 2009
  • Latest release: Dec 5, 2015
  • Number of updates: 53
  • Update frequency: every 43.6 days
  • Top authors: Jayjdk (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active / 10,121 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼147.52ms] Passed 4 tests

A check of server-side resources used by Youtube Profile Field
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.89 ▲0.0524.39 ▲2.49
Dashboard /wp-admin3.13 ▲0.0730.61 ▼5.62
Posts /wp-admin/edit.php3.24 ▲0.1331.24 ▲2.04
Add New Post /wp-admin/post-new.php5.49 ▲0.0569.11 ▼587.44
Media Library /wp-admin/upload.php3.07 ▲0.0722.89 ▲0.95
Youtube Profile Field /wp-admin/options-general.php?page=youtube-profile-field3.0422.75

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 11 new files
Database: no new tables, 1 new option
New WordPress options
ypf_options

Browser metrics Passed 4 tests

Checking browser requirements for Youtube Profile Field
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,671 ▲7015.80 ▲0.124.98 ▼0.8276.90 ▼0.63
Dashboard /wp-admin2,935 ▲426.08 ▼0.21113.74 ▼19.02167.28 ▼6.98
Posts /wp-admin/edit.php2,745 ▲53.24 ▲0.0263.12 ▼2.47134.24 ▼7.48
Add New Post /wp-admin/post-new.php3,816 ▲11218.77 ▼0.16449.00 ▲0.54163.21 ▼6.37
Media Library /wp-admin/upload.php1,754 ▲25.49 ▲0.03135.56 ▼9.42180.53 ▼16.48
Youtube Profile Field /wp-admin/options-general.php?page=youtube-profile-field1,0882.4254.98123.56

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin cannot be uninstalled
    • > Warning in wp-includes/class-wp-hook.php+303
    call_user_func_array() expects parameter 1 to be a valid callback, function 'uninstall' not found or invalid function name
  • The uninstall procedure has failed, leaving 1 option in the database
    • ypf_options

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 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/youtube-profile-field/functions.php:225
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/youtube-profile-field/admin.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/youtube-profile-field/index.php:31

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
10 plugin tags: oembed, field, shortcode, video, username...

youtube-profile-field/index.php 92% from 13 tests

This is the main PHP file of "Youtube Profile Field" version 3.1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("youtube-profile-field.php" instead of "index.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
Good job! No executable or dangerous file extensions detected532 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP4129276329
Markdown1560119
PO File29625184

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.14
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions20
▷ Named functions20100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
There are no PNG files in this plugin