84% bosta-woocommerce

Code Review | Bosta WooCommerce

WordPress plugin Bosta WooCommerce scored 84% from 54 tests.

About plugin

  • Plugin page: bosta-woocommerce
  • Plugin version: 3.0.9
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Mar 11, 2020
  • Latest release: Sep 17, 2023
  • Number of updates: 79
  • Update frequency: every 16.3 days
  • Top authors: bostateam (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

100+ active / 8,226 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.03MB] [CPU: ▲1.15ms] Passed 4 tests

An overview of server-side resources used by Bosta WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0540.48 ▲0.71
Dashboard /wp-admin3.33 ▲0.0344.73 ▼5.58
Posts /wp-admin/edit.php3.38 ▲0.0347.39 ▲4.07
Add New Post /wp-admin/post-new.php5.92 ▲0.0393.75 ▲8.02
Media Library /wp-admin/upload.php3.26 ▲0.0335.99 ▲5.40

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Bosta WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,846 ▲11113.22 ▼1.151.73 ▼0.0542.14 ▼10.24
Dashboard /wp-admin2,255 ▲675.82 ▲0.9298.14 ▼21.5171.75 ▲29.30
Posts /wp-admin/edit.php2,137 ▲481.98 ▼0.0539.45 ▲0.9344.38 ▲9.39
Add New Post /wp-admin/post-new.php1,714 ▲19421.78 ▼1.47728.59 ▲134.8353.34 ▲0.59
Media Library /wp-admin/upload.php1,425 ▲344.26 ▲0.04101.06 ▲0.4581.18 ▲38.93

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
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options

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

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
The following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/bosta-woocommerce/bosta-woocommerce.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention:
  • Donate link: Invalid URI found ("")
Please take inspiration from this readme.txt

bosta-woocommerce/bosta-woocommerce.php 92% from 13 tests

The main PHP script in "Bosta WooCommerce" version 3.0.9 is automatically included on every request by WordPress
The following require your attention:
  • Domain Path: The domain path folder does not exist ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected2,084 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP3173301,769
CSS2566302
SVG10113

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.67
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions45
▷ Named functions45100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants00.00%
▷ Class constants4100.00%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/refreshIcon.png13.00KB7.90KB▼ 39.25%
assets/images/refresh.png19.03KB8.83KB▼ 53.61%