74% bibliodam-connect

Code Review | BiblioDAM Connect

WordPress plugin BiblioDAM Connect scored74%from 54 tests.

About plugin

  • Plugin page: bibliodam-connect
  • Plugin version: 1.3.4
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.2.2
  • WordPress version: 6.3.1
  • First release: Jul 14, 2020
  • Latest release: Oct 23, 2023
  • Number of updates: 43
  • Update frequency: every 27.9 days
  • Top authors: publisherstoolbox (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,630 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼0.49MB] [CPU: ▲164.42ms] Passed 4 tests

Server-side resources used by BiblioDAM Connect
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1641.11 ▼0.91
Dashboard /wp-admin3.49 ▲0.15299.50 ▲243.65
Posts /wp-admin/edit.php3.50 ▲0.14331.87 ▲285.25
Add New Post /wp-admin/post-new.php3.49 ▼2.39271.08 ▲185.27
Media Library /wp-admin/upload.php3.49 ▲0.27266.33 ▲229.67

Server storage [IO: ▲0.62MB] [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: 56 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for BiblioDAM Connect
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,891 ▲13019.35 ▲4.691.71 ▼0.3441.18 ▼4.88
Dashboard /wp-admin2,290 ▲11010.51 ▲4.83221.45 ▲134.08106.24 ▲64.29
Posts /wp-admin/edit.php2,290 ▲1939.36 ▲7.3690.26 ▲55.6183.50 ▲49.51
Add New Post /wp-admin/post-new.php6,220 ▲4,69419.04 ▼3.90779.98 ▲116.35158.91 ▲104.73
Media Library /wp-admin/upload.php1,527 ▲12411.98 ▲7.76139.14 ▲40.84125.68 ▲80.92

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/bibliodam-connect/ptx/ptxDcPluginAddOns.php+124
    Undefined index: uploadToS3
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 6× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr__() in wp-content/plugins/bibliodam-connect/admin/partials/addons/ptx-inc-tabs-addons.php:2
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/bibliodam-connect/admin/partials/dc-admin-display.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr__() in wp-content/plugins/bibliodam-connect/admin/partials/settings/ptx-inc-tabs-settings.php:2
    • > PHP Notice
      Undefined variable: notificationCount in wp-content/plugins/bibliodam-connect/admin/partials/addons/ptx-inc-menu-add-ons.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr__() in wp-content/plugins/bibliodam-connect/admin/partials/addons/ptx-inc-menu-add-ons.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr__() in wp-content/plugins/bibliodam-connect/admin/partials/settings/ptx-inc-menu-settings.php:3

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: websuite, video, bibliodam, publishers

bibliodam-connect/bibliodam-connect.php Passed 13 tests

"BiblioDAM Connect" version 1.3.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
96 characters long description:
BiblioDAM Connect allows seamless integration of BiblioDAM media onto your WordPress website(s).

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 plugin2,390 lines of code in 37 files:
LanguageFilesBlank linesComment linesLines of code
PHP203201,3071,509
JavaScript11175394875
CSS6056

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity20.91
▷ Minimum class complexity1.00
▷ Maximum class complexity85.00
Average method complexity3.87
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods76
▷ Static methods56.58%
▷ Public methods6990.79%
▷ Protected methods00.00%
▷ Private methods79.21%
Functions5
▷ Named functions480.00%
▷ Anonymous functions120.00%
Constants3
▷ Global constants266.67%
▷ Class constants133.33%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
10 PNG files occupy 0.15MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/assets/img/bibliodam.png4.67KB3.44KB▼ 26.34%
admin/img/bibliodam.png4.67KB3.44KB▼ 26.34%
admin/img/launcher-icon.png5.30KB3.11KB▼ 41.23%
admin/img/logo.png0.94KB0.92KB▼ 1.36%
admin/assets/img/launcher-icon.png5.30KB3.11KB▼ 41.23%