10% nomiddleman-crypto-payments-for-woocommerce

Code Review | Nomiddleman Bitcoin and Crypto Payments for WooCommerce

WordPress plugin Nomiddleman Bitcoin and Crypto Payments for WooCommerce scored10%from 54 tests.

About plugin

  • Plugin page: nomiddleman-crypt...
  • Plugin version: 2.4.8
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-5.5.3
  • WordPress version: 6.3.1
  • First release: Apr 18, 2019
  • Latest release: Dec 7, 2020
  • Number of updates: 38
  • Update frequency: every 15.8 days
  • Top authors: rgostic (92.11%)nomiddleman (10.53%)

Code review

54 tests

User reviews

18 reviews

Install metrics

800+ active /20,138 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The following installer errors require your attention
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/nomiddleman-crypto-payments-for-woocommerce/src/NMM_Util.php+54
    Array and string offset access syntax with curly braces is deprecated

Server metrics [RAM: ▲0.06MB] [CPU: ▼1.70ms] Passed 4 tests

Server-side resources used by Nomiddleman Bitcoin and Crypto Payments for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0741.89 ▲1.27
Dashboard /wp-admin3.37 ▲0.0353.80 ▼6.78
Posts /wp-admin/edit.php3.48 ▲0.1357.82 ▲9.27
Add New Post /wp-admin/post-new.php5.95 ▲0.0792.95 ▼5.54
Media Library /wp-admin/upload.php3.29 ▲0.0737.92 ▲4.27

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 515 new files
Database: 3 new tables, 6 new options
New tables
wp_nmmpro_carousel
wp_nmmpro_hd_addresses
wp_nmmpro_payments
New WordPress options
db_upgraded
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Nomiddleman Bitcoin and Crypto Payments for WooCommerce: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.25 ▼0.132.09 ▲0.2249.44 ▲5.73
Dashboard /wp-admin2,206 ▲154.80 ▼0.07122.20 ▲15.8047.26 ▲8.67
Posts /wp-admin/edit.php2,092 ▼02.06 ▲0.0643.85 ▲4.2738.19 ▲2.59
Add New Post /wp-admin/post-new.php1,533 ▲1923.29 ▲5.62737.30 ▲56.2387.09 ▲34.60
Media Library /wp-admin/upload.php1,385 ▼04.32 ▲0.16108.31 ▼6.1745.88 ▼3.80

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
The following issues need your attention
  • 22× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/nomiddleman-crypto-payments-for-woocommerce/src/vendor/ReduxFramework/ReduxCore/templates/panel/content.tpl.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'themecheck' not found in wp-content/plugins/nomiddleman-crypto-payments-for-woocommerce/src/vendor/ReduxFramework/ReduxCore/inc/themecheck/checks/full_package.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/nomiddleman-crypto-payments-for-woocommerce/src/vendor/ReduxFramework/ReduxCore/inc/fields/select/elusive-icons.php:312
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/nomiddleman-crypto-payments-for-woocommerce/src/vendor/ReduxFramework/ReduxCore/inc/class.p.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Customize_Control' not found in wp-content/plugins/nomiddleman-crypto-payments-for-woocommerce/src/vendor/ReduxFramework/ReduxCore/inc/extensions/customizer/inc/customizer_control.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/nomiddleman-crypto-payments-for-woocommerce/nomiddleman-crypto-woocommerce.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/nomiddleman-crypto-payments-for-woocommerce/src/vendor/ReduxFramework/ReduxCore/templates/panel/header_stickybar.tpl.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/nomiddleman-crypto-payments-for-woocommerce/src/NMM_Gateway.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/nomiddleman-crypto-payments-for-woocommerce/src/vendor/ReduxFramework/ReduxCore/inc/welcome/views/about.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/nomiddleman-crypto-payments-for-woocommerce/src/vendor/ReduxFramework/ReduxCore/templates/panel/header.tpl.php:11

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

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Tags: Too many tags (122 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt is a good inspiration

nomiddleman-crypto-payments-for-woocommerce/nomiddleman-crypto-woocommerce.php 85% from 13 tests

The entry point to "Nomiddleman Bitcoin and Crypto Payments for WooCommerce" version 2.4.8 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Requires at least: Required version must match the one declared in readme.txt ("3.0.1" instead of "3.0.0")
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("nomiddleman-crypto-payments-for-woocommerce.php" instead of "nomiddleman-crypto-woocommerce.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin50,798 lines of code in 342 files:
LanguageFilesBlank linesComment linesLines of code
PHP1366,1737,18024,070
JavaScript872,6452,10612,325
Sass541,187607,580
JSON418405,121
SVG200935
CSS484535349
Bourne Shell43150122
XML310111
Markdown2490101
LESS10053
YAML102231

PHP code 50% from 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
It is recommended to fix the following
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 113)
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity33.85
▷ Minimum class complexity1.00
▷ Maximum class complexity883.00
Average method complexity5.71
▷ Minimum method complexity1.00
▷ Maximum method complexity113.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes142
▷ Abstract classes00.00%
▷ Concrete classes142100.00%
▷ Final classes00.00%
Methods993
▷ Static methods33934.14%
▷ Public methods81481.97%
▷ Protected methods919.16%
▷ Private methods888.86%
Functions40
▷ Named functions3895.00%
▷ Anonymous functions25.00%
Constants118
▷ Global constants4941.53%
▷ Class constants6958.47%
▷ Public constants69100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
80 compressed PNG files occupy 0.11MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
src/vendor/ReduxFramework/ReduxCore/assets/css/vendor/jquery-ui-bootstrap/images/ui-icons_ffffff_256x240.png4.27KB4.11KB▼ 3.78%
assets/img/bitcoinsv_logo_small.png1.00KB0.98KB▼ 2.15%
src/vendor/ReduxFramework/ReduxCore/assets/css/vendor/jquery-ui-bootstrap/images/ui-bg_glass_75_e6e6e6_1x400.png0.11KB0.14KB0.00%
assets/img/augur_logo_small.png1.21KB1.21KB0.48%
assets/img/basicattentiontoken_logo_small.png0.75KB0.72KB▼ 3.66%