78% display-embedded-videos-by-dbiota

Code Review | Display Embedded Videos by D.Biota

WordPress plugin Display Embedded Videos by D.Biota scored78%from 54 tests.

About plugin

  • Plugin page: display-embedded-...
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.2
  • WordPress version: 6.3.1
  • First release: Mar 31, 2015
  • Latest release: May 5, 2015
  • Number of updates: 32
  • Update frequency: every 1.1 days
  • Top authors: Diegobr (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

30+ active /2,480 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

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

Analyzing server-side resources used by Display Embedded Videos by D.Biota
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0243.42 ▼4.42
Dashboard /wp-admin3.32 ▲0.0251.20 ▼3.12
Posts /wp-admin/edit.php3.37 ▲0.0150.14 ▼1.92
Add New Post /wp-admin/post-new.php5.90 ▲0.0194.99 ▼2.07
Media Library /wp-admin/upload.php3.24 ▲0.0140.90 ▲1.96
Display Embedded Videos by D.Biota /wp-admin/options-general.php?page=display-embedded-videos-by-db3.2132.62

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 11 new files
Database: 1 new table, 9 new options
New tables
wp_displayembeddedvideosbydb
New WordPress options
displayembeddedvideosbydb_tb_name
can_compress_scripts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
displayembeddedvideosbydb_flag_recreation
displayembeddedvideosbydb_db_version
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Display Embedded Videos by D.Biota
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,923 ▲15213.66 ▼0.398.85 ▲6.7745.11 ▲0.58
Dashboard /wp-admin2,216 ▲254.85 ▼0.01101.00 ▼5.2842.39 ▼3.05
Posts /wp-admin/edit.php2,102 ▲102.00 ▲0.0140.69 ▼0.8533.73 ▼2.49
Add New Post /wp-admin/post-new.php1,533 ▲523.36 ▲5.13686.42 ▲46.3651.48 ▲0.55
Media Library /wp-admin/upload.php1,392 ▲44.23 ▼0.04100.04 ▼6.9146.42 ▲2.85
Display Embedded Videos by D.Biota /wp-admin/options-general.php?page=display-embedded-videos-by-db9532.2226.4029.93

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
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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 fix the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/display-embedded-videos-by-dbiota/display-embedded-videos-by-dbiota.php
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/display-embedded-videos-by-dbiota/uninstall.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/display-embedded-videos-by-dbiota/display-embedded-videos-by-dbiota-ajax-functions.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Tags: You are using too many tags: 17 tag instead of maximum 10
The official readme.txt is a good inspiration

display-embedded-videos-by-dbiota/display-embedded-videos-by-dbiota.php Passed 13 tests

This is the main PHP file of "Display Embedded Videos by D.Biota" version 2.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
84 characters long description:
You can display a gallery of the embedded Youtube and Vimeo videos within your site.

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
Good job! No executable or dangerous file extensions detected695 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP4234128553
JavaScript2239112
CSS28130

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.26
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%
Functions20
▷ Named functions20100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/gopro.png6.05KB2.68KB▼ 55.65%