73% doko-box-builder

Code Review | DokoBuilder : DIY Product Bundle for WooCommerce

WordPress plugin DokoBuilder : DIY Product Bundle for WooCommerce scored73%from 54 tests.

About plugin

  • Plugin page: doko-box-builder
  • Plugin version: 1.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.4
  • WordPress version: 6.3.1
  • First release: Aug 28, 2022
  • Latest release: Nov 24, 2023
  • Number of updates: 17
  • Update frequency: every 29.1 days
  • Top authors: homescript (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /430 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲5.03MB] [CPU: ▲18.57ms] 75% from 4 tests

Analyzing server-side resources used by DokoBuilder : DIY Product Bundle for WooCommerce
Please have a look at the following items
  • Extra RAM: Extra memory usage should kept under 5MB (currently 5.03MB on /wp-admin/admin.php?page=manage-dynamic-rules)
PageMemory (MB)CPU Time (ms)
Home /8.84 ▲5.3851.64 ▲12.13
Dashboard /wp-admin8.86 ▲5.5172.24 ▲7.61
Posts /wp-admin/edit.php8.86 ▲5.5084.05 ▲36.82
Add New Post /wp-admin/post-new.php9.62 ▲3.73111.23 ▲17.71
Media Library /wp-admin/upload.php8.86 ▲5.6371.76 ▲37.55
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius8.8661.48
Manage Dynamic Rules /wp-admin/admin.php?page=manage-dynamic-rules8.8663.35

Server storage [IO: ▲6.16MB] [DB: ▲0.07MB] Passed 3 tests

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 373 new files
Database: no new tables, 9 new options
New WordPress options
db_upgraded
fs_active_plugins
fs_accounts
widget_recent-posts
widget_theysaidso_widget
fs_debug_mode
theysaidso_admin_options
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

DokoBuilder : DIY Product Bundle for WooCommerce: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,486 ▼26114.15 ▼0.070.54 ▼1.166.42 ▼38.43
Dashboard /wp-admin2,227 ▲535.62 ▼0.0295.27 ▼5.2349.17 ▲3.74
Posts /wp-admin/edit.php2,136 ▲361.98 ▼0.0341.19 ▲3.7436.79 ▲1.60
Add New Post /wp-admin/post-new.php1,544 ▲1523.42 ▲0.27694.17 ▲77.8165.78 ▲9.61
Media Library /wp-admin/upload.php1,429 ▲264.24 ▲0.0498.23 ▼1.2943.78 ▲3.32
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius1,0871.6628.0328.98
Manage Dynamic Rules /wp-admin/admin.php?page=manage-dynamic-rules8422.0027.5328.64

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/doko-box-builder/core/vendor/freemius/includes/class-freemius.php+8486
    Undefined property: stdClass::$plugins
  • Zombie WordPress options detected upon uninstall: 9 options
    • widget_recent-posts
    • fs_active_plugins
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • fs_accounts
    • fs_debug_mode
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check 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 fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/doko-box-builder/public/class-hs-doko-public.php:818

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes: The official readme.txt might help

doko-box-builder/hs-doko.php 85% from 13 tests

The main PHP file in "DokoBuilder : DIY Product Bundle for WooCommerce" ver. 1.1.2 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("doko-box-builder.php" instead of "hs-doko.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis 97% from 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
There were no executable files found in this plugin65,198 lines of code in 264 files:
LanguageFilesBlank linesComment linesLines of code
PHP1298,24617,97435,018
JavaScript1103,4693,11924,137
CSS232921425,764
PO File2104116279

PHP code 50% from 2 tests

Analyzing cyclomatic complexity and code structure
Please fix the following
  • Class cyclomatic complexity should be reduced to less than 1000 (currently 3,073)
Cyclomatic complexity
Average complexity per logical line of code0.62
Average class complexity83.60
▷ Minimum class complexity1.00
▷ Maximum class complexity3,073.00
Average method complexity4.50
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes55
▷ Abstract classes23.64%
▷ Concrete classes5396.36%
▷ Final classes00.00%
Methods1,325
▷ Static methods20015.09%
▷ Public methods91769.21%
▷ Protected methods171.28%
▷ Private methods39129.51%
Functions120
▷ Named functions11394.17%
▷ Anonymous functions75.83%
Constants147
▷ Global constants10068.03%
▷ Class constants4731.97%
▷ Public constants47100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
8 PNG files occupy 0.93MB with 0.48MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
core/vendor/freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
admin/img/choose-products.png12.94KB2.54KB▼ 80.40%
core/vendor/freemius/assets/img/doko-box-builder.png9.16KB5.26KB▼ 42.58%
admin/img/choose-products-with-cart.png12.54KB2.31KB▼ 81.55%
admin/css/images/red-icons.png4.51KB4.18KB▼ 7.28%