10% templecoin-payments-for-woocommerce

Code Review | Templecoin Payments for WooCommerce

WordPress plugin Templecoin Payments for WooCommerce scored10%from 54 tests.

About plugin

  • Plugin page: templecoin-paymen...
  • Plugin version: 3.10.x...
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.9
  • WordPress version: 6.3.1
  • First release: Sep 18, 2014
  • Latest release: Sep 18, 2014
  • Number of updates: 2
  • Update frequency: every 3.0 days
  • Top authors: templecoin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /888 total downloads

Benchmarks

Plugin footprint 23% 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
The following installer errors require your attention
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/templecoin-payments-for-woocommerce/bwwc-utils.php+854
    Array and string offset access syntax with curly braces is deprecated

Server metrics [RAM: ▼1.39MB] [CPU: ▼53.43ms] Passed 4 tests

An overview of server-side resources used by Templecoin Payments for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.61 ▼0.856.73 ▼38.47
Dashboard /wp-admin2.63 ▼0.728.43 ▼52.59
Posts /wp-admin/edit.php2.63 ▼0.738.84 ▼36.51
Add New Post /wp-admin/post-new.php2.63 ▼3.2610.82 ▼86.13
Media Library /wp-admin/upload.php2.63 ▼0.609.33 ▼24.19

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 37 new files
Database: 1 new table, 7 new options
New tables
wp_bwwc_btc_addresses
New WordPress options
db_upgraded
widget_recent-comments
BWWC-Settings
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Templecoin Payments for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲6914.48 ▼0.171.62 ▼0.3139.92 ▼5.36
Dashboard /wp-admin2,221 ▲305.83 ▼0.08103.83 ▼4.9775.57 ▲29.61
Posts /wp-admin/edit.php2,110 ▲211.97 ▼0.0337.95 ▲3.7636.06 ▼5.32
Add New Post /wp-admin/post-new.php1,530 ▲1617.69 ▲0.16689.15 ▲46.8459.41 ▲0.21
Media Library /wp-admin/upload.php1,400 ▲124.23 ▼0.0097.22 ▼2.5363.10 ▲19.12

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/templecoin-payments-for-woocommerce/bwwc-utils.php+854
    Array and string offset access syntax with curly braces is deprecated
  • Zombie tables were found after uninstall: 1 table
    • wp_bwwc_btc_addresses
  • Zombie WordPress options detected upon uninstall: 7 options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • BWWC-Settings
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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
  • 7× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Interface 'PointInterface' not found in wp-content/plugins/templecoin-payments-for-woocommerce/phpecc/classes/Point.php:36
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/templecoin-payments-for-woocommerce/bwwc-bitcoin-gateway.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'EcDHInterface' not found in wp-content/plugins/templecoin-payments-for-woocommerce/phpecc/classes/EcDH.php:34
    • > PHP Fatal error
      Uncaught Error: Interface 'CurveFpInterface' not found in wp-content/plugins/templecoin-payments-for-woocommerce/phpecc/classes/CurveFp.php:31
    • > PHP Fatal error
      Uncaught Error: Interface 'PrivateKeyInterface' not found in wp-content/plugins/templecoin-payments-for-woocommerce/phpecc/classes/PrivateKey.php:27
    • > PHP Fatal error
      Uncaught Error: Interface 'SignatureInterface' not found in wp-content/plugins/templecoin-payments-for-woocommerce/phpecc/classes/Signature.php:30
    • > PHP Fatal error
      Uncaught Error: Interface 'PublicKeyInterface' not found in wp-content/plugins/templecoin-payments-for-woocommerce/phpecc/classes/PublicKey.php:27

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Screenshots: These screenshots require images: #1 (Checkout with option for templecoin payment.), #2 (Order received screen, including QR code of templecoin address and payment amount.), #3 (Templecoin Gateway settings screen.)
You can take inspiration from this readme.txt

templecoin-payments-for-woocommerce/bitcoinway-woocommerce.php 77% from 13 tests

The main file in "Templecoin Payments for WooCommerce" v. 3.10.x... serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Version: Plugin version number should only contain digits separated by dots (ex. "1.0.3" instead of "3.10.x...")
  • Description: Please keep the plugin description shorter than 140 characters (currently 162 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("templecoin-payments-for-woocommerce.php" instead of "bitcoinway-woocommerce.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
Good job! No executable or dangerous file extensions detected4,481 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
PHP251,2991,3704,481

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity40.39
▷ Minimum class complexity1.00
▷ Maximum class complexity233.00
Average method complexity6.50
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces0
Interfaces6
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes00.00%
Methods169
▷ Static methods10059.17%
▷ Public methods169100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions51
▷ Named functions51100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants10100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
11 PNG files occupy 0.49MB with 0.32MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-2.png20.21KB8.04KB▼ 60.19%
images/tpc_buyitnow_32x.png5.47KB1.83KB▼ 66.65%
images/btc_buyitnow_32x.png9.37KB3.08KB▼ 67.14%
screenshot-1.png25.90KB9.65KB▼ 62.75%
images/templecoin_16x.png3.54KB1.05KB▼ 70.37%