84% netbilling-for-woocommerce

Code Review | NETbilling for WooCommerce

WordPress plugin NETbilling for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: netbilling-for-wo...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9-6.2
  • WordPress version: 6.3.1
  • First release: Jun 3, 2022
  • Latest release: Aug 5, 2023
  • Number of updates: 6
  • Update frequency: every 79.5 days
  • Top authors: netbilling (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /236 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.04MB] [CPU: ▼4.69ms] Passed 4 tests

This is a short check of server-side resources used by NETbilling for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0440.32 ▼3.77
Dashboard /wp-admin3.34 ▲0.0456.22 ▲3.19
Posts /wp-admin/edit.php3.46 ▲0.1050.22 ▲1.35
Add New Post /wp-admin/post-new.php5.92 ▲0.0487.21 ▼19.53
Media Library /wp-admin/upload.php3.27 ▲0.0438.90 ▲3.83

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

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

Browser metrics Passed 4 tests

Checking browser requirements for NETbilling for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,823 ▲6213.21 ▼1.172.20 ▲0.2144.40 ▼0.06
Dashboard /wp-admin2,226 ▲204.80 ▼1.12109.51 ▲9.5138.30 ▲3.39
Posts /wp-admin/edit.php2,112 ▲92.02 ▲0.0438.50 ▼17.2934.02 ▼13.71
Add New Post /wp-admin/post-new.php1,553 ▲823.21 ▲0.15673.67 ▼10.0754.28 ▼12.35
Media Library /wp-admin/upload.php1,411 ▲114.12 ▼0.08122.91 ▲13.3750.90 ▲2.53

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 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
Please take a closer look at the following
  • 13× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/netbilling-for-woocommerce/vendor/skyverge/wc-plugin-framework/woocommerce/payment-gateway/admin/views/html-order-partial-capture.php:26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/netbilling-for-woocommerce/vendor/skyverge/wc-plugin-framework/woocommerce/payment-gateway/admin/views/html-user-profile-field-customer-id.php:27
    • > PHP Notice
      Undefined variable: token in wp-content/plugins/netbilling-for-woocommerce/vendor/skyverge/wc-plugin-framework/woocommerce/payment-gateway/admin/views/html-user-payment-token-editor-token.php on line 37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/netbilling-for-woocommerce/vendor/skyverge/wc-plugin-framework/woocommerce/payment-gateway/admin/views/html-user-payment-token-editor.php:28
    • > PHP Fatal error
      Uncaught Error: Class 'SkyVerge\\WooCommerce\\PluginFramework\\v5_10_12\\Payment_Gateway\\Handlers\\Abstract_Payment_Handler' not found in wp-content/plugins/netbilling-for-woocommerce/vendor/skyverge/wc-plugin-framework/woocommerce/payment-gateway/Handlers/Abstract_Hosted_Payment_Handler.php:39
    • > PHP Notice
      Undefined variable: input_name in wp-content/plugins/netbilling-for-woocommerce/vendor/skyverge/wc-plugin-framework/woocommerce/payment-gateway/admin/views/html-user-payment-token-editor-token.php on line 35
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/netbilling-for-woocommerce/vendor/skyverge/wc-plugin-framework/woocommerce/payment-gateway/admin/views/html-admin-gateway-status.php:31
    • > PHP Notice
      Undefined variable: index in wp-content/plugins/netbilling-for-woocommerce/vendor/skyverge/wc-plugin-framework/woocommerce/payment-gateway/admin/views/html-user-payment-token-editor-token.php on line 35
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/netbilling-for-woocommerce/vendor/skyverge/wc-plugin-framework/woocommerce/payment-gateway/admin/views/html-user-payment-token-editor-token.php on line 39
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/netbilling-for-woocommerce/vendor/skyverge/wc-plugin-framework/woocommerce/payment-gateway/admin/views/html-user-payment-token-editor-token.php:88

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
6 plugin tags: netbilling, credit card processing, gateway, woocommerce, transactions...

netbilling-for-woocommerce/netbilling-for-woocommerce.php Passed 13 tests

The principal PHP file in "NETbilling for WooCommerce" v. 1.0.0 is loaded by WordPress automatically on each request
57 characters long description:
Accept payments via NETbilling in your WooCommerce store.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin16,241 lines of code in 142 files:
LanguageFilesBlank linesComment linesLines of code
PHP1049,43718,69414,677
PO File14337661,097
JavaScript989208339
CSS7190107
SVG210021

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity22.65
▷ Minimum class complexity1.00
▷ Maximum class complexity271.00
Average method complexity2.45
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces17
Interfaces13
Traits1
Classes83
▷ Abstract classes2428.92%
▷ Concrete classes5971.08%
▷ Final classes00.00%
Methods1,538
▷ Static methods1288.32%
▷ Public methods1,07369.77%
▷ Protected methods44228.74%
▷ Private methods231.50%
Functions3
▷ Named functions00.00%
▷ Anonymous functions3100.00%
Constants95
▷ Global constants00.00%
▷ Class constants95100.00%
▷ Public constants95100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
22 compressed PNG files occupy 0.03MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor/skyverge/wc-plugin-framework/woocommerce/payment-gateway/assets/images/card-solo.png0.80KB0.86KB0.00%
vendor/skyverge/wc-plugin-framework/woocommerce/payment-gateway/assets/images/card-jcb.png0.80KB0.83KB0.00%
vendor/skyverge/wc-plugin-framework/woocommerce/payment-gateway/assets/images/card-moneybookers.png0.70KB0.73KB0.00%
vendor/skyverge/wc-plugin-framework/woocommerce/payment-gateway/assets/images/card-visa.png0.82KB0.85KB0.00%
vendor/skyverge/wc-plugin-framework/woocommerce/payment-gateway/assets/images/card-mastercard.png3.87KB2.16KB▼ 44.22%