83% wpyoutube-post

Code Review | Youtube video To Wordpress Post

WordPress plugin Youtube video To Wordpress Post scored83%from 54 tests.

About plugin

  • Plugin page: wpyoutube-post
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.0.1
  • WordPress version: 6.3.1
  • First release: Aug 31, 2022
  • Latest release: Sep 23, 2022
  • Number of updates: 5
  • Update frequency: every 5.6 days
  • Top authors: 05navneetsharma (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /548 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼1.15ms] Passed 4 tests

An overview of server-side resources used by Youtube video To Wordpress Post
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0340.20 ▲0.59
Dashboard /wp-admin3.33 ▲0.0348.24 ▼1.09
Posts /wp-admin/edit.php3.38 ▲0.0248.60 ▲3.27
Add New Post /wp-admin/post-new.php5.93 ▲0.0491.60 ▼2.56
Media Library /wp-admin/upload.php3.25 ▲0.0233.85 ▼1.54

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Youtube video To Wordpress Post
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,848 ▲11355.97 ▲41.591.67 ▼0.1738.99 ▲2.09
Dashboard /wp-admin2,254 ▲6248.28 ▲43.31474.97 ▲365.2934.75 ▼8.65
Posts /wp-admin/edit.php2,119 ▲3044.35 ▲42.35277.71 ▲238.9031.79 ▼1.11
Add New Post /wp-admin/post-new.php1,627 ▲9436.99 ▲13.65937.25 ▲273.8045.77 ▼7.19
Media Library /wp-admin/upload.php1,500 ▲11247.19 ▲42.97334.85 ▲238.6837.72 ▼6.46

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
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments

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 take a closer look at the following
  • 5× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/wpyoutube-post/inc/template/header.php:4
    • > PHP Fatal error
      require_once(): Failed opening required 'YTBTOWP_PLUGIN_DIR/inc/template/header.php' (include_path='.:/usr/share/php') in wp-content/plugins/wpyoutube-post/inc/template/view/config.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wpyoutube-post/inc/loader.php:17
    • > PHP Warning
      Use of undefined constant YTBTOWP_PLUGIN_DIR - assumed 'YTBTOWP_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/wpyoutube-post/inc/template/view/config.php on line 2
    • > PHP Warning
      require_once(YTBTOWP_PLUGIN_DIR/inc/template/header.php): failed to open stream: No such file or directory in wp-content/plugins/wpyoutube-post/inc/template/view/config.php on line 2

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 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Plugin Name: Please specify the plugin name on the first line ( === wpyoutube-post === )
  • Requires php: Version not formatted correctly
The official readme.txt is a good inspiration

wpyoutube-post/wpyoutube.php 85% from 13 tests

The main PHP script in "Youtube video To Wordpress Post" version 1.0 is automatically included on every request by WordPress
The following require your attention:
  • Description: Keep the plugin description shorter than 140 characters (currently 312 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wpyoutube-post.php" instead of "wpyoutube.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin2,365 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript113522711,842
PHP424851282
CSS5525241

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity27.00
▷ Minimum class complexity27.00
▷ Maximum class complexity27.00
Average method complexity3.89
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
5 PNG files occupy 0.45MB with 0.28MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png47.15KB16.43KB▼ 65.15%
assets/ banner-772x250.png211.71KB108.21KB▼ 48.89%
assets/screenshot-2.png86.00KB24.19KB▼ 71.87%
assets/screenshot-3.png111.88KB29.86KB▼ 73.31%
assets/icon-128x128.png7.88KB4.07KB▼ 48.35%