83% s3bubble-amazon-web-services-oembed-media-streaming-support

Code Review | S3Bubble Media Streaming (AWS|Elementor|YouTube|Vimeo Functionality)

WordPress plugin S3Bubble Media Streaming (AWS|Elementor|YouTube|Vimeo Functionality) scored 83% from 54 tests.

About plugin

  • Plugin page: s3bubble-amazon-w...
  • Plugin version: 8.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.7
  • WordPress version: 5.8.1
  • First release: Aug 2, 2016
  • Latest release: Jun 30, 2021
  • Number of updates: 155
  • Update frequency: every 11.6 days
  • Top authors: s3bubble (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

300+ active / 23,267 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 gracefully, with no errors

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

An overview of server-side resources used by S3Bubble Media Streaming (AWS|Elementor|YouTube|Vimeo Functionality)
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.98 ▲0.2645.43 ▲24.25
Dashboard /wp-admin3.21 ▲0.1648.96 ▲4.11
Posts /wp-admin/edit.php3.33 ▲0.2148.33 ▲3.23
Add New Post /wp-admin/post-new.php5.57 ▲0.1391.23 ▼553.51
Media Library /wp-admin/upload.php3.16 ▲0.1537.51 ▲3.12

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 63 new files
Database: no new tables, 3 new options
New WordPress options
s3bubble_oembed_connected_website
s3bubble_oembed_plugin_options
s3bubble_oembed_activation_date

Browser metrics Passed 4 tests

An overview of browser requirements for S3Bubble Media Streaming (AWS|Elementor|YouTube|Vimeo Functionality)
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,881 ▲28519.94 ▲4.42136.20 ▲125.4946.97 ▼1.31
Dashboard /wp-admin3,005 ▲716.20 ▲0.24139.79 ▼4.64111.96 ▼3.99
Posts /wp-admin/edit.php2,774 ▲352.73 ▲0.0266.84 ▲2.2991.69 ▼5.55
Add New Post /wp-admin/post-new.php1,533 ▼8218.67 ▼3.32360.93 ▲86.51126.07 ▲21.12
Media Library /wp-admin/upload.php1,842 ▲325.05 ▼0.00123.67 ▼32.99122.85 ▼2.62

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
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 3 options in the database
    • s3bubble_oembed_activation_date
    • s3bubble_oembed_connected_website
    • s3bubble_oembed_plugin_options

Smoke tests 75% 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)
Good news, no errors were detected

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
Please fix the following items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/s3bubble-amazon-web-services-oembed-media-streaming-support/includes/s3bubble-oembed.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ElementorS3BubbleOembed\\add_action() in wp-content/plugins/s3bubble-amazon-web-services-oembed-media-streaming-support/includes/elementor-plugin.php:82

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 80% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Tags: Please delete some tags, you are using 34 tag instead of maximum 10
The official readme.txt might help

s3bubble-amazon-web-services-oembed-media-streaming-support/s3bubble-oembed.php 62% from 13 tests

"S3Bubble Media Streaming (AWS|Elementor|YouTube|Vimeo Functionality)" version 8.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Domain Path: Prefix the domain path with a forward slash character ("/languages")
  • Requires at least: The required version number must match the one declared in readme.txt ("4.0" instead of "3.8")
  • Domain Path: Use only dashes and lowercase characters for the domain path ("languages")
  • Main file name: The principal plugin file should be the same as the plugin slug ("s3bubble-amazon-web-services-oembed-media-streaming-support.php" instead of "s3bubble-oembed.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 167 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin4,176 lines of code in 33 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript93622192,054
CSS1024331,183
PHP10410488663
PO File48892276

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity10.25
▷ Minimum class complexity2.00
▷ Maximum class complexity31.00
Average method complexity1.86
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes125.00%
Methods43
▷ Static methods12.33%
▷ Public methods3990.70%
▷ Protected methods36.98%
▷ Private methods12.33%
Functions11
▷ Named functions1090.91%
▷ Anonymous functions19.09%
Constants4
▷ Global constants250.00%
▷ Class constants250.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
24 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
dist/css/images/ic_cast_connected_blue_24dp.png1.28KB0.72KB▼ 43.85%
dist/images/ic_cast_black_24dp.png0.72KB0.60KB▼ 15.90%
dist/images/ic_cast_connected_black_24dp.png0.87KB0.72KB▼ 17.49%
dist/css/images/ic_cast_grey_24dp.png0.86KB0.58KB▼ 31.62%
dist/img/trans.png0.92KB0.09KB▼ 89.75%