73% buy-one-click-woocommerce

Code Review | Buy one click WooCommerce

WordPress plugin Buy one click WooCommerce scored 73% from 54 tests.

About plugin

  • Plugin page: buy-one-click-woo...
  • Plugin version: 1.18.0
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.9
  • WordPress version: 5.8.1
  • First release: Feb 7, 2015
  • Latest release: Nov 22, 2021
  • Number of updates: 72
  • Update frequency: every 34.4 days
  • Top authors: northmule (100%)

Code review

54 tests

User reviews

19 reviews

Install metrics

7,000+ active / 93,396 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.66MB] [CPU: ▼141.19ms] Passed 4 tests

This is a short check of server-side resources used by Buy one click WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.6540.09 ▲15.74
Dashboard /wp-admin3.73 ▲0.6742.46 ▲1.31
Posts /wp-admin/edit.php3.79 ▲0.6841.52 ▲2.65
Add New Post /wp-admin/post-new.php6.10 ▲0.6679.97 ▼570.88
Media Library /wp-admin/upload.php3.68 ▲0.6726.91 ▲2.17

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 310 new files
Database: 1 new table, 4 new options
New tables
wp_coderun_oneclickwoo_orders
New WordPress options
wp_coderun_oneclickwoo_db_version
buyoptions
coderun_unique_string_today
buynotification

Browser metrics Passed 4 tests

An overview of browser requirements for Buy one click WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,694 ▲9215.61 ▲0.005.10 ▲0.1876.67 ▲2.62
Dashboard /wp-admin2,930 ▲346.11 ▼0.06115.68 ▼11.30163.46 ▼10.47
Posts /wp-admin/edit.php2,737 ▼33.35 ▲0.1161.01 ▼6.18130.03 ▼9.10
Add New Post /wp-admin/post-new.php3,698 ▼818.63 ▼0.46449.70 ▲5.19158.49 ▼12.73
Media Library /wp-admin/upload.php1,752 ▼05.53 ▲0.09148.50 ▲18.26178.83 ▼0.88

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_coderun_oneclickwoo_orders
  • This plugin does not fully uninstall, leaving 4 options in the database
    • wp_coderun_oneclickwoo_db_version
    • coderun_unique_string_today
    • buyoptions
    • buynotification

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 198× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/buy-one-click-woocommerce/vendor/composer/installers/src/Composer/Installers/ElggInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/buy-one-click-woocommerce/vendor/composer/installers/src/Composer/Installers/SyliusInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Formatter\\JsonFormatter' not found in wp-content/plugins/buy-one-click-woocommerce/vendor/monolog/monolog/src/Monolog/Formatter/LogglyFormatter.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/buy-one-click-woocommerce/vendor/composer/installers/src/Composer/Installers/TYPO3CmsInstaller.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'Monolog\\Formatter\\FormatterInterface' not found in wp-content/plugins/buy-one-click-woocommerce/vendor/monolog/monolog/src/Monolog/Formatter/FlowdockFormatter.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\MailHandler' not found in wp-content/plugins/buy-one-click-woocommerce/vendor/monolog/monolog/src/Monolog/Handler/NativeMailerHandler.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/buy-one-click-woocommerce/vendor/composer/installers/src/Composer/Installers/LanManagementSystemInstaller.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/buy-one-click-woocommerce/vendor/composer/installers/src/Composer/Installers/KanboardInstaller.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Formatter\ormalizerFormatter' not found in wp-content/plugins/buy-one-click-woocommerce/vendor/monolog/monolog/src/Monolog/Formatter/WildfireFormatter.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/buy-one-click-woocommerce/vendor/composer/installers/src/Composer/Installers/CakePHPInstaller.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
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 require attention: You can look at the official readme.txt

buy-one-click-woocommerce/buycli-index.php 77% from 13 tests

The main file in "Buy one click WooCommerce" v. 1.18.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("buy-one-click-woocommerce.php" instead of "buycli-index.php")
  • Requires at least: Required version does not match the one declared in readme.txt ("5.0" instead of "5.2")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin23,431 lines of code in 297 files:
LanguageFilesBlank linesComment linesLines of code
PHP2613,0336,63713,492
CSS1452205,706
JavaScript66252461,781
PO File2440437929
Markdown51900604
JSON500567
SVG100229
YAML3313123

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity6.62
▷ Minimum class complexity1.00
▷ Maximum class complexity65.00
Average method complexity2.52
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces15
Interfaces9
Traits5
Classes228
▷ Abstract classes93.95%
▷ Concrete classes21996.05%
▷ Final classes20.91%
Methods915
▷ Static methods859.29%
▷ Public methods63269.07%
▷ Protected methods21523.50%
▷ Private methods687.43%
Functions34
▷ Named functions411.76%
▷ Anonymous functions3088.24%
Constants77
▷ Global constants33.90%
▷ Class constants7496.10%
▷ Public constants5371.62%

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