84% dream-broker-embed

Code Review | Dream Broker Embed

WordPress plugin Dream Broker Embed scored 84% from 54 tests.

About plugin

  • Plugin page: dream-broker-embed
  • Plugin version: 1.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-3.6
  • WordPress version: 6.3.1
  • First release: Sep 9, 2013
  • Latest release: Apr 4, 2014
  • Number of updates: 10
  • Update frequency: every 20.8 days
  • Top authors: Timo Saarinen (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,246 total downloads

Benchmarks

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.04MB] [CPU: ▼7.05ms] Passed 4 tests

An overview of server-side resources used by Dream Broker Embed
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0541.60 ▲1.55
Dashboard /wp-admin3.35 ▲0.0544.46 ▼9.53
Posts /wp-admin/edit.php3.40 ▲0.0448.56 ▼3.86
Add New Post /wp-admin/post-new.php5.95 ▲0.0689.34 ▼16.36
Media Library /wp-admin/upload.php3.27 ▲0.0436.91 ▲3.04

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Dream Broker Embed
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,918 ▲18314.14 ▼0.167.20 ▲5.5443.21 ▼11.14
Dashboard /wp-admin2,241 ▲535.09 ▲0.25105.45 ▼1.7639.53 ▼2.39
Posts /wp-admin/edit.php2,126 ▲372.29 ▲0.2736.86 ▲0.6134.06 ▲2.55
Add New Post /wp-admin/post-new.php1,541 ▲823.47 ▲0.44601.71 ▼14.1833.17 ▼45.97
Media Library /wp-admin/upload.php1,426 ▲354.41 ▲0.1998.34 ▼8.9441.74 ▼2.42

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 6× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/dream-broker-embed/db-embed-categories.php on line 4
    • > PHP Notice
      Undefined variable: result in wp-content/plugins/dream-broker-embed/db-embed-categories.php on line 2
    • > PHP Notice
      Undefined variable: categories in wp-content/plugins/dream-broker-embed/db-embed-categories.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/dream-broker-embed/db-embed-video-list.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dream-broker-embed/db-embed.php:279
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/dream-broker-embed/db-embed-current-video.php:2

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Donate link: Invalid URI found ("")
The official readme.txt might help

dream-broker-embed/db-embed.php 92% from 13 tests

Analyzing the main PHP file in "Dream Broker Embed" version 1.1.2
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("dream-broker-embed.php" instead of "db-embed.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected631 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP4448342
CSS1281164
JavaScript2252125

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.29
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%
Functions11
▷ Named functions11100.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
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
video-hover.png1.65KB1.26KB▼ 23.69%
play-btn.png2.48KB1.84KB▼ 25.69%