84% yellow-bitcoin-payment-for-woocommerce

Code Review | Bitcoin Payments by Yellow (for woocommerce)

WordPress plugin Bitcoin Payments by Yellow (for woocommerce) scored84%from 54 tests.

About plugin

  • Plugin page: yellow-bitcoin-pa...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0+
  • WordPress version: 6.3.1
  • First release: Jun 14, 2015
  • Latest release: Jun 30, 2015
  • Number of updates: 15
  • Update frequency: every 1.1 days
  • Top authors: Mahmoud200m (100%)

Code review

54 tests

User reviews

1 review

Install metrics

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

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

A check of server-side resources used by Bitcoin Payments by Yellow (for woocommerce)
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0040.33 ▼8.08
Dashboard /wp-admin3.31 ▲0.0047.08 ▼2.21
Posts /wp-admin/edit.php3.36 ▲0.0051.00 ▲6.78
Add New Post /wp-admin/post-new.php5.89 ▲0.0097.09 ▲2.36
Media Library /wp-admin/upload.php3.23 ▲0.0033.65 ▼0.46

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 260 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Bitcoin Payments by Yellow (for woocommerce)
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.48 ▲0.131.76 ▼0.1142.60 ▼3.13
Dashboard /wp-admin2,203 ▲155.86 ▲0.0194.18 ▼24.3140.16 ▼2.95
Posts /wp-admin/edit.php2,089 ▼02.03 ▲0.0239.76 ▲3.7034.65 ▼0.83
Add New Post /wp-admin/post-new.php1,542 ▲618.20 ▼5.09609.83 ▼49.7856.46 ▲5.49
Media Library /wp-admin/upload.php1,382 ▼94.18 ▼0.0294.38 ▼8.7041.70 ▼1.50

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 132× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Ring\\Future\\FutureInterface' not found in wp-content/plugins/yellow-bitcoin-payment-for-woocommerce/vendor/guzzlehttp/guzzle/src/Pool.php:34
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/yellow-bitcoin-payment-for-woocommerce/vendor/guzzlehttp/streams/tests/NoSeekStreamTest.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\RequestException' not found in wp-content/plugins/yellow-bitcoin-payment-for-woocommerce/vendor/guzzlehttp/guzzle/src/Exception/CouldNotRewindStreamException.php:4
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Event\\HasEmitterInterface' not found in wp-content/plugins/yellow-bitcoin-payment-for-woocommerce/vendor/guzzlehttp/guzzle/src/ClientInterface.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\ClientInterface' not found in wp-content/plugins/yellow-bitcoin-payment-for-woocommerce/vendor/guzzlehttp/guzzle/src/Client.php:18
    • > PHP Fatal error
      Uncaught Error: Interface 'React\\Promise\\ExtendedPromiseInterface' not found in wp-content/plugins/yellow-bitcoin-payment-for-woocommerce/vendor/react/promise/src/RejectedPromise.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\TransferException' not found in wp-content/plugins/yellow-bitcoin-payment-for-woocommerce/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Message\\AbstractMessage' not found in wp-content/plugins/yellow-bitcoin-payment-for-woocommerce/vendor/guzzlehttp/guzzle/src/Message/Request.php:12
    • > PHP Fatal error
      Cannot use lexical variable $eventName as a parameter name in wp-content/plugins/yellow-bitcoin-payment-for-woocommerce/vendor/guzzlehttp/guzzle/src/Event/Emitter.php on line 48
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/yellow-bitcoin-payment-for-woocommerce/vendor/react/promise/tests/TestCase.php:5

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 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: bitcoin, woocommerce, yellow, payment, yellowpay

yellow-bitcoin-payment-for-woocommerce/woocommerce-yellow.php 92% from 13 tests

The principal PHP file in "Bitcoin Payments by Yellow (for woocommerce)" v. 1.0.1 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("yellow-bitcoin-payment-for-woocommerce.php" instead of "woocommerce-yellow.php")

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
Success! There were no dangerous files found in this plugin21,866 lines of code in 245 files:
LanguageFilesBlank linesComment linesLines of code
PHP1923,0054,69316,123
Markdown1064602,576
reStructuredText191,2221,5702,029
JSON700451
make57810333
JavaScript11860163
YAML417076
XML42071
Python210041
HTML1003

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity7.22
▷ Minimum class complexity1.00
▷ Maximum class complexity89.00
Average method complexity1.96
▷ Minimum method complexity1.00
▷ Maximum method complexity43.00
Code structure
Namespaces25
Interfaces25
Traits15
Classes150
▷ Abstract classes42.67%
▷ Concrete classes14697.33%
▷ Final classes32.05%
Methods1,377
▷ Static methods866.25%
▷ Public methods1,26591.87%
▷ Protected methods181.31%
▷ Private methods946.83%
Functions252
▷ Named functions197.54%
▷ Anonymous functions23392.46%
Constants11
▷ Global constants00.00%
▷ Class constants11100.00%
▷ Public constants11100.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
2 PNG files occupy 0.24MB with 0.08MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor/guzzlehttp/guzzle/docs/_static/logo.png241.87KB69.68KB▼ 71.19%
vendor/guzzlehttp/guzzle/docs/_static/guzzle-icon.png0.78KB0.94KB0.00%