83% sagi-binance-pay

Code Review | SAGI Crypto integration for Binance Pay

WordPress plugin SAGI Crypto integration for Binance Pay scored 83% from 54 tests.

About plugin

  • Plugin page: sagi-binance-pay
  • Plugin version: 0.1.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.1.1
  • WordPress version: 6.3.1
  • First release: Jan 16, 2023
  • Latest release: Jan 16, 2023
  • Number of updates: 2
  • Update frequency: every 2.0 days
  • Top authors: sagicrypto (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

30+ active / 855 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

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

A check of server-side resources used by SAGI Crypto integration for Binance Pay
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0135.21 ▼15.33
Dashboard /wp-admin3.31 ▲0.0144.43 ▼4.57
Posts /wp-admin/edit.php3.36 ▲0.0148.02 ▼7.43
Add New Post /wp-admin/post-new.php5.89 ▲0.0188.70 ▼9.62
Media Library /wp-admin/upload.php3.24 ▲0.0133.55 ▼3.62

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

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

Browser metrics Passed 4 tests

SAGI Crypto integration for Binance Pay: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲6013.62 ▼0.785.52 ▲3.6439.35 ▼5.86
Dashboard /wp-admin2,215 ▲275.84 ▼0.02110.09 ▼7.0844.66 ▲2.17
Posts /wp-admin/edit.php2,077 ▼121.98 ▼0.0239.28 ▼0.2136.53 ▼1.30
Add New Post /wp-admin/post-new.php1,543 ▲1023.23 ▲0.09669.64 ▼11.2859.14 ▲1.83
Media Library /wp-admin/upload.php1,391 ▲34.29 ▲0.0799.10 ▼7.2742.66 ▼1.92

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

SRP 50% 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
Almost there! Just fix the following items
  • 9× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/sagi-binance-pay/src/Gateway/GSMBinancePayGateway.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'GSMBinancePay\\WC\\Exception\\BinancePayException' not found in wp-content/plugins/sagi-binance-pay/src/Exception/ConnectException.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'GSMBinancePay\\WC\\Http\\ResponseInterface' not found in wp-content/plugins/sagi-binance-pay/src/Http/Response.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'GSMBinancePay\\WC\\Client\\AbstractClient' not found in wp-content/plugins/sagi-binance-pay/src/Client/BinanceCertificate.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'GSMBinancePay\\WC\\Http\\ClientInterface' not found in wp-content/plugins/sagi-binance-pay/src/Http/CurlClient.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'GSMBinancePay\\WC\\Exception\\RequestException' not found in wp-content/plugins/sagi-binance-pay/src/Exception/BadRequestException.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'GSMBinancePay\\WC\\Exception\\RequestException' not found in wp-content/plugins/sagi-binance-pay/src/Exception/ForbiddenException.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'GSMBinancePay\\WC\\Client\\AbstractClient' not found in wp-content/plugins/sagi-binance-pay/src/Client/BinanceOrder.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'GSMBinancePay\\WC\\Exception\\BinancePayException' not found in wp-content/plugins/sagi-binance-pay/src/Exception/RequestException.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 86% from 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
8 plugin tags: binancepay, binance, woocommerce, payment gateway, sagi crypto...

sagi-binance-pay/gsmbinancepay-for-woocommerce.php 69% from 13 tests

The entry point to "SAGI Crypto integration for Binance Pay" version 0.1.0 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 ("sagi-binance-pay.php" instead of "gsmbinancepay-for-woocommerce.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Requires PHP: Required version does not match the one declared in readme.txt ("8.0" instead of "7.4")
  • Description: Please don't use more than 140 characters for the plugin description (currently 440 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin1,481 lines of code in 30 files:
LanguageFilesBlank linesComment linesLines of code
PHP283914751,466
SVG10014
JSON1001

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity8.17
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.71
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces8
Interfaces2
Traits0
Classes21
▷ Abstract classes00.00%
▷ Concrete classes21100.00%
▷ Final classes00.00%
Methods102
▷ Static methods2726.47%
▷ Public methods8078.43%
▷ Protected methods1918.63%
▷ Private methods32.94%
Functions5
▷ Named functions240.00%
▷ Anonymous functions360.00%
Constants7
▷ Global constants457.14%
▷ Class constants342.86%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin