84% better-youtube-embed-block

Code Review | Better Youtube Embed Block

WordPress plugin Better Youtube Embed Block scored 84% from 54 tests.

About plugin

  • Plugin page: better-youtube-em...
  • Plugin version: 1.0.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.3
  • WordPress version: 6.3.1
  • First release: Nov 23, 2022
  • Latest release: Aug 11, 2023
  • Number of updates: 9
  • Update frequency: every 29.1 days
  • Top authors: Mr2P (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

900+ active / 3,606 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼2.68ms] Passed 4 tests

A check of server-side resources used by Better Youtube Embed Block
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0342.81 ▲1.12
Dashboard /wp-admin3.31 ▲0.0145.55 ▼3.05
Posts /wp-admin/edit.php3.36 ▲0.0143.69 ▲2.59
Add New Post /wp-admin/post-new.php5.90 ▲0.0185.24 ▼11.37
Media Library /wp-admin/upload.php3.24 ▲0.0140.21 ▲4.57

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

Better Youtube Embed Block: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,828 ▲9314.45 ▼0.201.79 ▼0.0137.63 ▼7.60
Dashboard /wp-admin2,209 ▲174.85 ▼0.13100.63 ▼7.0441.01 ▲3.86
Posts /wp-admin/edit.php2,086 ▼32.01 ▼0.0434.32 ▼8.2333.04 ▼3.16
Add New Post /wp-admin/post-new.php1,688 ▲14624.44 ▲6.41620.52 ▲7.4052.92 ▼1.20
Media Library /wp-admin/upload.php1,388 ▼34.24 ▲0.1095.25 ▼7.1941.53 ▼1.62

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
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

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
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/better-youtube-embed-block/better-youtube-embed-block.php:25

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found


Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
5 plugin tags: block, embed, youtube, video, gutenberg

better-youtube-embed-block/better-youtube-embed-block.php 85% from 13 tests

"Better Youtube Embed Block" version 1.0.2'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:
  • Requires at least: Required version does not match the one declared in readme.txt ("5.8.0" instead of "5.8")
  • Requires PHP: Required version does not match the one declared in readme.txt ("7.0.0" instead of "7.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin42 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.00
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
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions1100.00%
▷ Anonymous functions00.00%
▷ Global constants00.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
No PNG files were detected