10% baghera

Code Review | Baghera

WordPress plugin Baghera scored10%from 54 tests.

About plugin

  • Plugin page: baghera
  • Plugin version: 0.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.0
  • WordPress version: 6.3.1
  • First release: Jul 6, 2022
  • Latest release: Jul 6, 2022
  • Number of updates: 6
  • Update frequency: every 1.0 days
  • Top authors: gluelabs (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /166 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
It is recommended to fix the following installer errors
  • Install procedure had errors
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, class 'Woocommerce_Baghera' does not have a method 'swoocommerce_baghera_addon_activate'

Server metrics [RAM: ▼0.09MB] [CPU: ▼21.78ms] Passed 4 tests

A check of server-side resources used by Baghera
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1242.62 ▲0.32
Dashboard /wp-admin3.22 ▼0.1329.58 ▼38.42
Posts /wp-admin/edit.php3.35 ▼0.0038.20 ▼15.42
Add New Post /wp-admin/post-new.php5.60 ▼0.2967.16 ▼25.64
Media Library /wp-admin/upload.php3.30 ▲0.0732.55 ▼7.64
Creazione Fattura /wp-admin/admin.php?page=woocommerce-baghera-creazione-fattura3.2027.53
Rimuovi Metadato di Fattura Creata /wp-admin/admin.php?page=woocommerce-baghera-delete-metadato-fattura-creata3.2025.62

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Baghera
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲6614.31 ▼0.061.74 ▼0.4639.33 ▼12.44
Dashboard /wp-admin2,215 ▲415.56 ▼0.0687.88 ▼17.1839.45 ▲0.76
Posts /wp-admin/edit.php2,120 ▲201.99 ▼0.1736.31 ▼4.3436.36 ▲1.07
Add New Post /wp-admin/post-new.php1,546 ▲1823.73 ▲0.32661.18 ▼26.0558.61 ▲11.08
Media Library /wp-admin/upload.php1,420 ▲204.08 ▼0.15104.63 ▲9.6545.92 ▲4.09
Creazione Fattura /wp-admin/admin.php?page=woocommerce-baghera-creazione-fattura6791.516.6214.25
Rimuovi Metadato di Fattura Creata /wp-admin/admin.php?page=woocommerce-baghera-delete-metadato-fattura-creata7782.0229.0722.11

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
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% 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
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=woocommerce-baghera-delete-metadato-fattura-creata
    • > Notice in wp-content/plugins/baghera/class-woocommerce-baghera.php+104
    Trying to access array offset on value of type bool

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
1 plugin tags: fatturazione

baghera/class-woocommerce-baghera.php 85% from 13 tests

Analyzing the main PHP file in "Baghera" version 0.1
The following require your attention:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: Name the main plugin file the same as the plugin slug ("baghera.php" instead of "class-woocommerce-baghera.php")

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
No dangerous file extensions were detected864 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP3161226745
CSS126296
JavaScript15023

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity74.00
▷ Minimum class complexity74.00
▷ Maximum class complexity74.00
Average method complexity3.21
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods33
▷ Static methods00.00%
▷ Public methods33100.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

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/baghera_seat.png22.13KB7.40KB▼ 66.58%