83% billplz-for-woocommerce

Code Review | Billplz for WooCommerce

WordPress plugin Billplz for WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: billplz-for-wooco...
  • Plugin version: 3.28.3
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.4.1
  • WordPress version: 6.3.1
  • First release: May 21, 2016
  • Latest release: Nov 30, 2023
  • Number of updates: 161
  • Update frequency: every 17.1 days
  • Top authors: wanzulnet (92.55%)billplz (5.59%)yiedpozi (3.11%)

Code review

54 tests

User reviews

8 reviews

Install metrics

10,000+ active /113,437 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

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

This is a short check of server-side resources used by Billplz for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.12 ▼3.18
Dashboard /wp-admin3.31 ▼0.0444.18 ▼17.24
Posts /wp-admin/edit.php3.36 ▲0.0047.38 ▲1.92
Add New Post /wp-admin/post-new.php5.89 ▲0.0081.39 ▼9.11
Media Library /wp-admin/upload.php3.23 ▲0.0031.47 ▼3.43

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 30 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Billplz for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲2814.27 ▼0.441.69 ▼0.2338.59 ▼5.83
Dashboard /wp-admin2,192 ▲175.54 ▼0.1292.00 ▼13.1341.25 ▼2.93
Posts /wp-admin/edit.php2,100 ▼01.95 ▼0.0339.24 ▲2.1936.50 ▼0.09
Add New Post /wp-admin/post-new.php1,526 ▼123.39 ▲0.15594.01 ▼98.5261.59 ▲0.94
Media Library /wp-admin/upload.php1,403 ▲34.18 ▲0.0295.80 ▼0.4942.47 ▲0.91

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments

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 | 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
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/billplz-for-woocommerce/includes/admin/bfw_requery_button_in_order_page.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/billplz-for-woocommerce/includes/wc_bill_inquiry.php:66
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/billplz-for-woocommerce/includes/admin/bfw_requery_button.php:32
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/billplz-for-woocommerce/includes/admin/bfw_requery_meta_box.php:34

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 86% 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
Attributes that require attention: You can take inspiration from this readme.txt

billplz-for-woocommerce/billplzWoo.php 77% from 13 tests

The entry point to "Billplz for WooCommerce" version 3.28.3 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("billplz-for-woocommerce.php" instead of "billplzWoo.php")
  • Domain Path: The domain path folder does not exist ("/languages/")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

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
Good job! No executable or dangerous file extensions detected2,934 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
PHP22759722,706
JavaScript3195152
CSS13476

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity46.83
▷ Minimum class complexity1.00
▷ Maximum class complexity195.00
Average method complexity2.94
▷ Minimum method complexity1.00
▷ Maximum method complexity32.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes116.67%
Methods135
▷ Static methods139.63%
▷ Public methods10779.26%
▷ Protected methods10.74%
▷ Private methods2720.00%
Functions25
▷ Named functions2392.00%
▷ Anonymous functions28.00%
Constants12
▷ Global constants975.00%
▷ Class constants325.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.05MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/billplz-logo-all.png16.03KB17.04KB0.00%
assets/images/billplz-logo-old.png13.02KB5.70KB▼ 56.17%
assets/images/billplz-logo-fpx.png17.43KB18.43KB0.00%