93% brainshark-embed

Code Review | Brainshark Embed Plugin

WordPress plugin Brainshark Embed Plugin scored 93% from 54 tests.

About plugin

  • Plugin page: brainshark-embed
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.8.1
  • WordPress version: 5.9.2
  • First release: Feb 10, 2014
  • Latest release: Feb 10, 2014
  • Number of updates: 3
  • Update frequency: every 1.0 days
  • Top authors: ccar10 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 835 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.02MB] [CPU: ▼305.71ms] Passed 4 tests

Server-side resources used by Brainshark Embed Plugin
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0165.93 ▲3.42
Dashboard /wp-admin3.42 ▲0.0138.28 ▲2.04
Posts /wp-admin/edit.php3.65 ▲0.0142.47 ▼3.96
Add New Post /wp-admin/post-new.php6.89 ▼0.08101.58 ▼1,216.87
Media Library /wp-admin/upload.php3.30 ▲0.0126.46 ▼4.03

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Brainshark Embed Plugin
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,783 ▲2916.23 ▲0.647.34 ▲1.372.24 ▼0.18
Dashboard /wp-admin2,895 ▲346.17 ▼0.03119.45 ▼18.21158.08 ▼1.32
Posts /wp-admin/edit.php2,685 ▼63.35 ▼0.0171.51 ▲6.19145.96 ▲1.50
Add New Post /wp-admin/post-new.php1,690 ▼2120.99 ▼0.36428.52 ▼41.39160.19 ▲5.23
Media Library /wp-admin/upload.php1,698 ▼05.50 ▼0.03146.71 ▼1.77194.69 ▼2.55

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The plugin uninstalled successfully, without leaving any zombie files or tables

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
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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 items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/brainshark-embed/Player.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/brainshark-embed/Brainshark.php:35

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 90% 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:
  • Plugin Name: Please specify the plugin name on the first line ( === brainshark-embed === )
Please take inspiration from this readme.txt

brainshark-embed/Brainshark.php 85% from 13 tests

The primary PHP file in "Brainshark Embed Plugin" version 2.0 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("brainshark-embed.php" instead of "Brainshark.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 394 characters long)

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
Good job! No executable or dangerous file extensions detected44 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP3111144

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.08
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin