10% dintero-checkout-express

Code Review | Dintero Checkout (Legacy)

WordPress plugin Dintero Checkout (Legacy) scored 10% from 54 tests.

About plugin

  • Plugin page: dintero-checkout-...
  • Plugin version: 2022.11.22
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.8
  • WordPress version: 6.3.1
  • First release: Jan 22, 2021
  • Latest release: Nov 28, 2022
  • Number of updates: 50
  • Update frequency: every 13.5 days
  • Top authors: dintero (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 8,158 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
These installer errors require your attention
  • Install procedure had errors
    • > Warning in wp-content/plugins/dintero-checkout-express/includes/class-wc-dintero-hp-setting.php+11
    require_once(wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-settings-api.php): failed to open stream: No such file or directory

Server metrics [RAM: ▲0.00MB] [CPU: ▼10.11ms] Passed 4 tests

An overview of server-side resources used by Dintero Checkout (Legacy)
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0035.65 ▼16.47
Dashboard /wp-admin3.31 ▲0.0044.94 ▼9.98
Posts /wp-admin/edit.php3.36 ▲0.0049.86 ▲1.11
Add New Post /wp-admin/post-new.php5.89 ▲0.0087.76 ▼15.09
Media Library /wp-admin/upload.php3.23 ▲0.0034.73 ▲1.23

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 82 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Dintero Checkout (Legacy)
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.18 ▼1.121.64 ▼0.1440.16 ▲2.53
Dashboard /wp-admin2,206 ▲185.85 ▲0.82108.09 ▼10.3339.26 ▼9.35
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0139.33 ▼2.4334.65 ▼1.81
Add New Post /wp-admin/post-new.php1,534 ▼823.10 ▲4.92640.61 ▲26.9659.68 ▲7.52
Media Library /wp-admin/upload.php1,382 ▼94.18 ▼0.0499.19 ▼4.3343.25 ▲0.68

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/dintero-checkout-express/tests/phpunit/bootstrap.php
  • 11× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wc_print_notices() in wp-content/plugins/dintero-checkout-express/templates/dhp-checkout-noembed-express.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/dintero-checkout-express/tests/phpunit/test-class-wc-gateway-dintero-hp.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function WCDHP() in wp-content/plugins/dintero-checkout-express/templates/dhp-add-to-cart.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function WC() in wp-content/plugins/dintero-checkout-express/templates/dhp-checkout-order-received.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wc_print_notices() in wp-content/plugins/dintero-checkout-express/templates/dhp-checkout.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/dintero-checkout-express/includes/class-wc-gateway-dintero-hp.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/dintero-checkout-express/tests/phpunit/test-ajax.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/dintero-checkout-express/tests/phpunit/test-class-wc-dintero-hp-helper.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function update_option() in wp-content/plugins/dintero-checkout-express/tests/phpunit/setup.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/dintero-checkout-express/tests/phpunit/test-class-wc-dintero-hp-checkout.php:10

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 86% 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:
  • Tags: There are too many tags (18 tag instead of maximum 10)
Please take inspiration from this readme.txt

dintero-checkout-express/dintero-hp.php 77% from 13 tests

The entry point to "Dintero Checkout (Legacy)" version 2022.11.22 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • 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
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("dintero-checkout-express.php" instead of "dintero-hp.php")

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 detected9,704 lines of code in 63 files:
LanguageFilesBlank linesComment linesLines of code
PHP351,6722,4517,904
JavaScript998143692
CSS4839501
Bourne Shell58525368
Markdown2230112
YAML11037
XML26036
JSON10020
Dockerfile10013
make13012
Bourne Again Shell1328
INI1001

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity41.21
▷ Minimum class complexity1.00
▷ Maximum class complexity272.00
Average method complexity3.51
▷ Minimum method complexity1.00
▷ Maximum method complexity76.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes24
▷ Abstract classes14.17%
▷ Concrete classes2395.83%
▷ Final classes14.35%
Methods367
▷ Static methods7319.89%
▷ Public methods30683.38%
▷ Protected methods82.18%
▷ Private methods5314.44%
Functions7
▷ Named functions571.43%
▷ Anonymous functions228.57%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
3 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/pay-with-dintero-btn.png8.85KB3.77KB▼ 57.38%
assets/images/dintero.png7.31KB3.42KB▼ 53.24%
assets/images/dintero-express-btn.png10.36KB4.54KB▼ 56.21%