63% blrt-wp-embed

Code Review | Blrt WP Embed

WordPress plugin Blrt WP Embed scored63%from 54 tests.

About plugin

  • Plugin page: blrt-wp-embed
  • Plugin version: 1.6.9
  • PHP version: 7.4.16
  • WordPress compatibility: 2.9-4.7.5
  • WordPress version: 6.3.1
  • First release: Jan 22, 2015
  • Latest release: Oct 30, 2017
  • Number of updates: 20
  • Update frequency: every 50.6 days
  • Top authors: Blrt (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,396 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.16MB] [CPU: ▼4.98ms] Passed 4 tests

Analyzing server-side resources used by Blrt WP Embed
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1642.37 ▼0.11
Dashboard /wp-admin3.47 ▲0.1749.52 ▼5.60
Posts /wp-admin/edit.php3.58 ▲0.2346.78 ▼2.56
Add New Post /wp-admin/post-new.php6.05 ▲0.1687.45 ▼11.66
Media Library /wp-admin/upload.php3.39 ▲0.1636.09 ▲0.79
Add New Gallery /wp-admin/admin.php?page=blrt-add-gallery3.3941.77
Blrt Galleries /wp-admin/admin.php?page=blrt-galleries3.3633.45
Blrt Web /wp-admin/admin.php?page=blrt-web3.3633.13
Settings /wp-admin/admin.php?page=blrt-settings3.3637.04

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 39 new files
Database: 1 new table, 9 new options
New tables
wp_blrtwpembed
New WordPress options
widget_theysaidso_widget
can_compress_scripts
blrtwpembed_table_gallery_version
blrtwpembed_table_previous_versions
widget_recent-posts
db_upgraded
theysaidso_admin_options
blrt_web_settings
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Blrt WP Embed
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,866 ▲12013.22 ▼1.402.07 ▼0.1942.43 ▼2.11
Dashboard /wp-admin2,260 ▲725.84 ▼0.0799.65 ▼10.0238.85 ▼5.51
Posts /wp-admin/edit.php2,143 ▲542.02 ▲0.0139.20 ▲2.5334.94 ▼0.83
Add New Post /wp-admin/post-new.php1,555 ▲4123.48 ▲5.82673.70 ▼5.9754.65 ▼0.02
Media Library /wp-admin/upload.php1,445 ▲574.23 ▲0.07100.95 ▲1.2143.08 ▼0.21
Add New Gallery /wp-admin/admin.php?page=blrt-add-gallery1,0982.0932.3277.56
Blrt Galleries /wp-admin/admin.php?page=blrt-galleries8731.8128.4328.99
Blrt Web /wp-admin/admin.php?page=blrt-web1,1293.3651.9189.03
Settings /wp-admin/admin.php?page=blrt-settings9231.9526.6728.41

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_blrtwpembed
  • Zombie WordPress options were found after uninstall: 9 options
    • widget_theysaidso_widget
    • blrtwpembed_table_gallery_version
    • blrt_web_settings
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • blrtwpembed_table_previous_versions
    • widget_recent-posts
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
The following issues need your attention
  • 3× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/blrt-wp-embed/blrt-wp-embed.php
    • > /wp-content/plugins/blrt-wp-embed/includes/blrt-web.php
    • > /wp-content/plugins/blrt-wp-embed/includes/blrt-mcebutton.php
  • 6× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/blrt-wp-embed/includes/shortcodes.php:4
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/blrt-wp-embed/includes/blrt-add-gallery.php on line 16
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/blrt-wp-embed/includes/blrt-galleries.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/blrt-wp-embed/includes/blrt-settings.php:5
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/blrt-wp-embed/includes/blrt-galleries.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_col() on null in wp-content/plugins/blrt-wp-embed/includes/blrt-add-gallery.php:17

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following browser errors
    • > GET request to /wp-admin/admin.php?page=blrt-web
    • > Javascript (severe) in unknown
    https://blrt.com/user/themes/landio/js/landio.min.js 17871:4 Uncaught ReferenceError: htmlVideo is not defined

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
3 plugin tags: oembed, embed, blrt

blrt-wp-embed/blrt-wp-embed.php Passed 13 tests

The main PHP script in "Blrt WP Embed" version 1.6.9 is automatically included on every request by WordPress
83 characters long description:
Enable Blrts and Blrt Galleries in your pages and posts - just like YouTube videos.

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
No dangerous file extensions were detected1,169 lines of code in 29 files:
LanguageFilesBlank linesComment linesLines of code
PHP899751,037
HTML223113
JavaScript8088
CSS7077
SVG4004

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity38.00
▷ Minimum class complexity38.00
▷ Maximum class complexity38.00
Average method complexity2.28
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods29
▷ Static methods00.00%
▷ Public methods2586.21%
▷ Protected methods00.00%
▷ Private methods413.79%
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
8 PNG files occupy 0.13MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
dist/img/placeholder-l.png7.58KB6.76KB▼ 10.85%
dist/img/preview_snippet.png21.91KB7.45KB▼ 66.00%
dist/img/blrt_grn_20x20.png0.22KB0.22KB0.00%
dist/img/preview_player.png37.95KB12.55KB▼ 66.92%
dist/img/placeholder-xl.png10.94KB10.67KB▼ 2.47%