78% bg-rutube-embed

Code Review | Bg RuTube Embed

WordPress plugin Bg RuTube Embed scored78%from 54 tests.

About plugin

  • Plugin page: bg-rutube-embed
  • Plugin version: 1.6.3
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.1.1
  • WordPress version: 6.3.1
  • First release: Apr 21, 2022
  • Latest release: Jan 15, 2023
  • Number of updates: 39
  • Update frequency: every 6.9 days
  • Top authors: VBog (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active /2,212 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼7.53ms] Passed 4 tests

An overview of server-side resources used by Bg RuTube Embed
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.82 ▼0.00
Dashboard /wp-admin3.32 ▼0.0249.65 ▼15.19
Posts /wp-admin/edit.php3.37 ▲0.0249.17 ▼2.19
Add New Post /wp-admin/post-new.php5.90 ▲0.0188.53 ▼12.72
Media Library /wp-admin/upload.php3.24 ▲0.0138.48 ▲2.50
Bg RuTube Embed /wp-admin/options-general.php?page=bg_rutube_slug3.2132.93

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Bg RuTube Embed
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,901 ▲14013.64 ▼0.739.44 ▲7.7141.91 ▼3.44
Dashboard /wp-admin2,202 ▲255.61 ▲0.0893.86 ▼6.7541.68 ▼4.70
Posts /wp-admin/edit.php2,101 ▲12.03 ▲0.0733.95 ▲0.0737.31 ▼0.43
Add New Post /wp-admin/post-new.php1,529 ▲123.05 ▼0.07674.75 ▼0.0254.19 ▲3.19
Media Library /wp-admin/upload.php1,407 ▲74.23 ▲0.0599.75 ▼2.9544.22 ▼1.39
Bg RuTube Embed /wp-admin/options-general.php?page=bg_rutube_slug8831.9923.0129.94

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 50% 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)
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/bg-rutube-embed/bg-rutube.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bg-rutube-embed/inc/options.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: channel, playlist, rutube, video, videohosting

bg-rutube-embed/bg-rutube.php 92% from 13 tests

The main PHP script in "Bg RuTube Embed" version 1.6.3 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("bg-rutube-embed.php" instead of "bg-rutube.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected771 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP27984447
CSS11015173
JavaScript171489
PO File1212352
SVG10010

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
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%
Functions22
▷ Named functions1986.36%
▷ Anonymous functions313.64%
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
No PNG files were detected