74% taptree-payments-for-woocommerce

Code Review | TapTree Payments for WooCommerce

WordPress plugin TapTree Payments for WooCommerce scored74%from 54 tests.

About plugin

  • Plugin page: taptree-payments-...
  • Plugin version: 1.2.5
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.2
  • WordPress version: 6.3.1
  • First release: Jun 6, 2023
  • Latest release: Jul 4, 2023
  • Number of updates: 5
  • Update frequency: every 6.2 days
  • Top authors: taptree (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /383 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▼1.71MB] [CPU: ▼55.43ms] Passed 4 tests

This is a short check of server-side resources used by TapTree Payments for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.28 ▼1.189.79 ▼32.85
Dashboard /wp-admin2.30 ▼1.006.18 ▼49.59
Posts /wp-admin/edit.php2.30 ▼1.056.80 ▼48.44
Add New Post /wp-admin/post-new.php2.30 ▼3.596.07 ▼90.83
Media Library /wp-admin/upload.php2.30 ▼0.936.54 ▼31.63

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 199 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

TapTree 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,823 ▲6214.76 ▲0.412.68 ▲0.8443.15 ▲1.14
Dashboard /wp-admin2,201 ▲245.62 ▼0.0083.81 ▼19.7945.30 ▲1.71
Posts /wp-admin/edit.php2,109 ▲122.10 ▲0.0736.36 ▲0.3338.42 ▼0.07
Add New Post /wp-admin/post-new.php1,535 ▲723.00 ▼0.03681.60 ▲7.4154.87 ▼4.85
Media Library /wp-admin/upload.php1,406 ▲64.18 ▲0.0398.09 ▼16.7149.07 ▲2.01

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Warning in wp-content/plugins/taptree-payments-for-woocommerce/taptree-payments-for-woocommerce.php+82
    Use of undefined constant WC_PLUGIN_FILE - assumed 'WC_PLUGIN_FILE' (this will throw an Error in a future version of PHP)
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means 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
Please fix the following items
  • 109× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\AbstractProcessingHandler' not found in wp-content/plugins/taptree-payments-for-woocommerce/vendor/monolog/monolog/src/Monolog/Handler/RedisPubSubHandler.php:29
    • > PHP Fatal error
      Uncaught Error: Interface 'Monolog\\Formatter\\FormatterInterface' not found in wp-content/plugins/taptree-payments-for-woocommerce/vendor/monolog/monolog/src/Monolog/Formatter/ChromePHPFormatter.php:21
    • > PHP Fatal error
      Uncaught Error: Interface 'Monolog\\Processor\\ProcessorInterface' not found in wp-content/plugins/taptree-payments-for-woocommerce/vendor/monolog/monolog/src/Monolog/Processor/IntrospectionProcessor.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\AbstractProcessingHandler' not found in wp-content/plugins/taptree-payments-for-woocommerce/vendor/monolog/monolog/src/Monolog/Handler/GelfHandler.php:25
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Container\\ContainerExceptionInterface' not found in wp-content/plugins/taptree-payments-for-woocommerce/vendor/psr/container/src/NotFoundExceptionInterface.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\SocketHandler' not found in wp-content/plugins/taptree-payments-for-woocommerce/vendor/monolog/monolog/src/Monolog/Handler/InsightOpsHandler.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Formatter\ormalizerFormatter' not found in wp-content/plugins/taptree-payments-for-woocommerce/vendor/monolog/monolog/src/Monolog/Formatter/ElasticsearchFormatter.php:21
    • > PHP Fatal error
      Uncaught Error: Interface 'Monolog\\Processor\\ProcessorInterface' not found in wp-content/plugins/taptree-payments-for-woocommerce/vendor/monolog/monolog/src/Monolog/Processor/ProcessIdProcessor.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\AbstractProcessingHandler' not found in wp-content/plugins/taptree-payments-for-woocommerce/vendor/monolog/monolog/src/Monolog/Handler/IFTTTHandler.php:28
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\SocketHandler' not found in wp-content/plugins/taptree-payments-for-woocommerce/vendor/monolog/monolog/src/Monolog/Handler/PushoverHandler.php:28

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
You can look at the official readme.txt

taptree-payments-for-woocommerce/taptree-payments-for-woocommerce.php Passed 13 tests

The main PHP script in "TapTree Payments for WooCommerce" version 1.2.5 is automatically included on every request by WordPress
99 characters long description:
Accept payments and protect the climate in WooCommerce with the official TapTree WooCommerce plugin

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin13,218 lines of code in 191 files:
LanguageFilesBlank linesComment linesLines of code
PHP1722,8757,11611,236
Markdown1040001,088
JSON600535
JavaScript16210339
YAML1131017
CSS1003

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity9.34
▷ Minimum class complexity1.00
▷ Maximum class complexity105.00
Average method complexity2.57
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces27
Interfaces20
Traits6
Classes137
▷ Abstract classes85.84%
▷ Concrete classes12994.16%
▷ Final classes32.33%
Methods905
▷ Static methods606.63%
▷ Public methods63770.39%
▷ Protected methods17519.34%
▷ Private methods9310.28%
Functions54
▷ Named functions814.81%
▷ Anonymous functions4685.19%
Constants117
▷ Global constants00.00%
▷ Class constants117100.00%
▷ Public constants8774.36%

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