84% dibsy-payments

Code Review | Dibsy Checkout for WooCommerce

WordPress plugin Dibsy Checkout for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: dibsy-payments
  • Plugin version: 3.0.4
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2.0
  • WordPress version: 6.3.1
  • First release: Sep 5, 2021
  • Latest release: May 22, 2023
  • Number of updates: 29
  • Update frequency: every 21.6 days
  • Top authors: dibsyplugins (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /1,108 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼4.89ms] Passed 4 tests

An overview of server-side resources used by Dibsy Checkout for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0441.52 ▼1.15
Dashboard /wp-admin3.34 ▲0.0450.50 ▲0.81
Posts /wp-admin/edit.php3.39 ▲0.0343.21 ▼7.00
Add New Post /wp-admin/post-new.php5.92 ▲0.0387.07 ▼12.22
Media Library /wp-admin/upload.php3.26 ▲0.0339.20 ▲5.88

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Dibsy Checkout for WooCommerce: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲914.22 ▲0.051.91 ▼0.1143.14 ▲0.49
Dashboard /wp-admin2,201 ▲275.57 ▼0.0388.80 ▲2.6744.14 ▲1.14
Posts /wp-admin/edit.php2,106 ▲32.01 ▲0.0234.73 ▼4.9435.25 ▲0.20
Add New Post /wp-admin/post-new.php1,534 ▲823.24 ▲0.27684.97 ▲71.7955.66 ▲0.29
Media Library /wp-admin/upload.php1,406 ▲124.22 ▲0.0696.42 ▼2.2442.04 ▲0.76

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Dibsy_Gateway_Abstract' not found in wp-content/plugins/dibsy-payments/includes/payment-methods/wc-gateway-dibsy-naps.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/dibsy-payments/includes/abstracts/wc-gateway-dibsy-abstract.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function untrailingslashit() in wp-content/plugins/dibsy-payments/dibsy-checkout.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Dibsy_Gateway_Abstract' not found in wp-content/plugins/dibsy-payments/includes/payment-methods/wc-gateway-dibsy-creditcard.php:4

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
6 plugin tags: payments, dibsy, payment gateway, credit card, woocommerce...

dibsy-payments/dibsy-checkout.php 92% from 13 tests

This is the main PHP file of "Dibsy Checkout for WooCommerce" version 3.0.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("dibsy-payments.php" instead of "dibsy-checkout.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin1,505 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP123745851,128
JavaScript2249322
SVG40126
Markdown113021
CSS1108

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity11.17
▷ Minimum class complexity1.00
▷ Maximum class complexity26.00
Average method complexity2.72
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes00.00%
Methods71
▷ Static methods2738.03%
▷ Public methods6692.96%
▷ Protected methods34.23%
▷ Private methods22.82%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants23
▷ Global constants521.74%
▷ Class constants1878.26%
▷ Public constants18100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected