79% bubuku-media-library

Code Review | Bubuku Media Library

WordPress plugin Bubuku Media Library scored79%from 54 tests.

About plugin

  • Plugin page: bubuku-media-library
  • Plugin version: 1.0.6
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.3
  • WordPress version: 6.3.1
  • First release: Sep 10, 2022
  • Latest release: Aug 26, 2023
  • Number of updates: 8
  • Update frequency: every 43.8 days
  • Top authors: lruizcode (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active /1,114 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼5.99ms] Passed 4 tests

A check of server-side resources used by Bubuku Media Library
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0443.02 ▲0.45
Dashboard /wp-admin3.34 ▲0.0455.03 ▲0.83
Posts /wp-admin/edit.php3.39 ▲0.0453.14 ▲1.77
Add New Post /wp-admin/post-new.php5.94 ▲0.0586.67 ▼26.99
Media Library /wp-admin/upload.php3.39 ▲0.1644.30 ▲6.46
BBK Media Library /wp-admin/options-general.php?page=bubuku-media-library-options3.2335.58

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 39 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Bubuku Media Library
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.24 ▼0.111.77 ▼0.0744.67 ▼2.98
Dashboard /wp-admin2,199 ▲225.63 ▼0.0296.41 ▼0.3647.96 ▲5.35
Posts /wp-admin/edit.php2,111 ▲81.95 ▼0.0841.87 ▲0.4433.51 ▼9.19
Add New Post /wp-admin/post-new.php1,529 ▲123.08 ▼0.09613.19 ▼68.9159.58 ▼1.73
Media Library /wp-admin/upload.php1,560 ▲16310.94 ▲6.81250.41 ▲121.2440.11 ▼11.20
BBK Media Library /wp-admin/options-general.php?page=bubuku-media-library-options1,0812.4335.9430.16

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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 14× PHP files output text when accessed directly (only 10 are shown):
    • > /wp-content/plugins/bubuku-media-library/src/BML_assets.php
    • > /wp-content/plugins/bubuku-media-library/src/index.php
    • > /wp-content/plugins/bubuku-media-library/src/BML_filter.php
    • > /wp-content/plugins/bubuku-media-library/bubuku-media-library.php
    • > /wp-content/plugins/bubuku-media-library/src/BML_restapi.php
    • > /wp-content/plugins/bubuku-media-library/src/BML_bulk_action.php
    • > /wp-content/plugins/bubuku-media-library/uninstall.php
    • > /wp-content/plugins/bubuku-media-library/index.php
    • > /wp-content/plugins/bubuku-media-library/src/BML_admin_setup_report.php
    • > /wp-content/plugins/bubuku-media-library/src/BML_common.php

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There are user-side issues you should fix
    • > GET request to /wp-admin/options-general.php?page=bubuku-media-library-options
    • > Network (severe)
    wp-json/bbk_medialibrary/v1/get-notification-settings - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/options-general.php?page=bubuku-media-library-options
    • > Javascript (severe) in unknown
    /wp-admin/options-general.php?page=bubuku-media-library-options 0:0 Uncaught SyntaxError: Unexpected token '

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
5 plugin tags: alt text, media library, performance, images, seo

bubuku-media-library/bubuku-media-library.php Passed 13 tests

Analyzing the main PHP file in "Bubuku Media Library" version 1.0.6
70 characters long description:
Plugin created by Bubuku for media library management and optimization

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
No dangerous file extensions were detected1,762 lines of code in 32 files:
LanguageFilesBlank linesComment linesLines of code
PHP243775591,399
SVG100132
CSS222395
PO File2343888
JavaScript2156543
JSON1005

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity11.57
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity2.62
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes14
▷ Abstract classes00.00%
▷ Concrete classes14100.00%
▷ Final classes00.00%
Methods92
▷ Static methods1819.57%
▷ Public methods7985.87%
▷ Protected methods00.00%
▷ Private methods1314.13%
Functions8
▷ Named functions112.50%
▷ Anonymous functions787.50%
Constants8
▷ Global constants8100.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
1 PNG file occupies 0.40MB with 0.19MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/img/report_hero.png414.45KB219.23KB▼ 47.10%