84% bba-mastro

Code Review | BBA Mastro Plugin

WordPress plugin BBA Mastro Plugin scored84%from 54 tests.

About plugin

  • Plugin page: bba-mastro
  • Plugin version: 2.4.12
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.2
  • WordPress version: 6.3.1
  • First release: May 29, 2018
  • Latest release: Nov 22, 2023
  • Number of updates: 104
  • Update frequency: every 19.5 days
  • Top authors: developerbbamastro (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

10+ active /2,199 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼3.33ms] Passed 4 tests

Analyzing server-side resources used by BBA Mastro Plugin
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.53 ▼4.01
Dashboard /wp-admin3.31 ▲0.0148.20 ▲0.05
Posts /wp-admin/edit.php3.43 ▲0.0747.22 ▼5.24
Add New Post /wp-admin/post-new.php5.89 ▲0.0193.72 ▼2.98
Media Library /wp-admin/upload.php3.23 ▲0.0132.49 ▼1.07

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 25 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for BBA Mastro Plugin
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,821 ▲3414.34 ▲0.001.81 ▼0.3340.66 ▼2.42
Dashboard /wp-admin2,197 ▲205.62 ▼0.05108.24 ▲17.7350.90 ▲12.01
Posts /wp-admin/edit.php2,102 ▲21.96 ▼0.0039.23 ▼1.5233.75 ▼6.00
Add New Post /wp-admin/post-new.php1,528 ▲223.29 ▲0.08611.70 ▼26.8449.88 ▼5.47
Media Library /wp-admin/upload.php1,402 ▲24.19 ▲0.0195.94 ▼0.1142.28 ▲2.98

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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 take a closer look at the following
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/bba-mastro/includes/bba-api/bbamastro-config.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/bba-mastro/admin/templates/wc-settings/bba_admin_product_categories.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/bba-mastro/admin/templates/wc-settings/bba_admin_custom_order_fields.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 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
Please fix the following attributes:
  • Tags: Too many tags (16 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can look at the official readme.txt

bba-mastro/bbamastro.php 92% from 13 tests

The primary PHP file in "BBA Mastro Plugin" version 2.4.12 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("bba-mastro.php" instead of "bbamastro.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin1,846 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP18313561,686
JavaScript2161126
CSS14034

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity19.33
▷ Minimum class complexity2.00
▷ Maximum class complexity52.00
Average method complexity2.95
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes18.33%
Methods111
▷ Static methods3834.23%
▷ Public methods8475.68%
▷ Protected methods21.80%
▷ Private methods2522.52%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin