72% pb-oembed-html5-audio-with-cache-support

Code Review | PB oEmbed HTML5 Audio - with Cache Support

WordPress plugin PB oEmbed HTML5 Audio - with Cache Support scored72%from 54 tests.

About plugin

  • Plugin page: pb-oembed-html5-a...
  • Plugin version: 2.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.0.9
  • WordPress version: 6.3.1
  • First release: Feb 8, 2013
  • Latest release: Dec 15, 2018
  • Number of updates: 49
  • Update frequency: every 43.6 days
  • Top authors: PascalBajorat (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

1,000+ active /43,423 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

An overview of server-side resources used by PB oEmbed HTML5 Audio - with Cache Support
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0242.20 ▼0.37
Dashboard /wp-admin3.33 ▲0.0348.23 ▼0.71
Posts /wp-admin/edit.php3.39 ▲0.0343.81 ▲3.01
Add New Post /wp-admin/post-new.php5.16 ▼0.7257.74 ▼42.66
Media Library /wp-admin/upload.php3.26 ▲0.0336.33 ▲2.22
HTML5 Audio /wp-admin/options-general.php?page=pb_html5_audio_options3.2027.90

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 12 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
pb_html5_audio_options
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for PB oEmbed HTML5 Audio - with Cache Support
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,820 ▲3414.17 ▼0.112.08 ▲0.0945.06 ▲0.06
Dashboard /wp-admin2,201 ▲305.63 ▲0.0495.38 ▲0.3643.47 ▼0.54
Posts /wp-admin/edit.php2,123 ▲232.23 ▲0.2135.72 ▼0.6732.83 ▲0.34
Add New Post /wp-admin/post-new.php6,380 ▲4,84519.25 ▲1.20946.50 ▲301.3671.53 ▼7.23
Media Library /wp-admin/upload.php1,419 ▲254.15 ▼0.0697.96 ▼0.1342.82 ▼0.40
HTML5 Audio /wp-admin/options-general.php?page=pb_html5_audio_options9881.8026.5838.54

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • pb_html5_audio_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=pb_html5_audio_options
    • > Warning in wp-content/plugins/pb-oembed-html5-audio-with-cache-support/pascal-bajorat_com-libs/pascal-bajorat_com.php+343
    Illegal string offset 'donationmessage'
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=pb_html5_audio_options
    • > Notice in wp-content/plugins/pb-oembed-html5-audio-with-cache-support/pascal-bajorat_com-libs/pascal-bajorat_com.php+343
    Uninitialized string offset: 0
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=pb_html5_audio_options
    • > Warning in wp-content/plugins/pb-oembed-html5-audio-with-cache-support/pascal-bajorat_com-libs/pascal-bajorat_com.php+343
    Illegal string offset 'metabox'

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
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pb-oembed-html5-audio-with-cache-support/pb-oEmbed-html5-audio.php:19

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There are user-side issues you should fix
    • > GET request to /wp-admin/options-general.php?page=pb_html5_audio_options
    • > Network (severe)
    https://button.flattr.com/flattr-badge-large.png - Failed to load resource: the server responded with a status of 404 ()

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Tags: You are using too many tags: 13 tag instead of maximum 10
You can take inspiration from this readme.txt

pb-oembed-html5-audio-with-cache-support/pb-oEmbed-html5-audio.php 77% from 13 tests

Analyzing the main PHP file in "PB oEmbed HTML5 Audio - with Cache Support" version 2.6
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("pb-oembed-html5-audio-with-cache-support.php" instead of "pb-oEmbed-html5-audio.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 329 characters long)
  • Text Domain: The text domain should only use lowercase characters and dashes

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin814 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP211057562
PO File275110248
CSS1004

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity28.50
▷ Minimum class complexity27.00
▷ Maximum class complexity30.00
Average method complexity3.75
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods20
▷ Static methods00.00%
▷ Public methods20100.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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
3 PNG files occupy 0.02MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
pascal-bajorat_com-libs/delete.png0.70KB0.72KB0.00%
pascal-bajorat_com-libs/mcs.png23.77KB10.43KB▼ 56.12%
pascal-bajorat_com-libs/bullet_wrench.png0.44KB0.42KB▼ 3.35%