78% one-click-buy-button-for-woocommerce

Code Review | One Click Buy Button For WooCommerce

WordPress plugin One Click Buy Button For WooCommerce scored 78% from 54 tests.

About plugin

  • Plugin page: one-click-buy-but...
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.1.1
  • WordPress version: 6.3.1
  • First release: Nov 5, 2021
  • Latest release: Mar 29, 2023
  • Number of updates: 5
  • Update frequency: every 102.0 days
  • Top authors: shahriarprogrammer (60%)racydev (60%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 496 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼0.59ms] Passed 4 tests

A check of server-side resources used by One Click Buy Button For WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0437.40 ▼3.12
Dashboard /wp-admin3.33 ▲0.0350.48 ▲0.44
Posts /wp-admin/edit.php3.38 ▲0.0349.88 ▲5.82
Add New Post /wp-admin/post-new.php5.91 ▲0.0384.74 ▲0.05
Media Library /wp-admin/upload.php3.25 ▲0.0332.97 ▲0.27

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-posts
theysaidso_admin_options
one_click_buy_btn_options
widget_recent-comments

Browser metrics Passed 4 tests

One Click Buy Button For WooCommerce: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲7313.63 ▼1.001.67 ▼0.0438.50 ▼8.27
Dashboard /wp-admin2,210 ▲194.84 ▼1.06103.08 ▲3.1342.56 ▲0.61
Posts /wp-admin/edit.php2,096 ▲72.04 ▲0.0039.39 ▲2.6635.88 ▲2.76
Add New Post /wp-admin/post-new.php1,518 ▼323.12 ▲0.32663.16 ▼14.8251.33 ▼7.83
Media Library /wp-admin/upload.php1,392 ▲44.33 ▲0.1296.80 ▼9.2345.76 ▼0.06

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 5× PHP files output text when accessed directly:
    • > /wp-content/plugins/one-click-buy-button-for-woocommerce/includes/one_click_buy_btn-enqueue.php
    • > /wp-content/plugins/one-click-buy-button-for-woocommerce/includes/one_click_buy_btn-replace-addCart.php
    • > /wp-content/plugins/one-click-buy-button-for-woocommerce/one-click-buy-button-for-woocommerce.php
    • > /wp-content/plugins/one-click-buy-button-for-woocommerce/includes/one_click_buy_btn-buy-now.php
    • > /wp-content/plugins/one-click-buy-button-for-woocommerce/includes/one_click_buy_btn-setting.php
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_errors() in wp-content/plugins/one-click-buy-button-for-woocommerce/includes/settings/one_click_buy_btn-html.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed: The official readme.txt might help

one-click-buy-button-for-woocommerce/one-click-buy-button-for-woocommerce.php 92% from 13 tests

The main PHP script in "One Click Buy Button For WooCommerce" version 1.0.1 is automatically included on every request by WordPress
The following require your attention:
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes

Code Analysis Passed 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 plugin572 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
CSS2620291
PHP85059281

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity2.50
▷ Minimum class complexity1.00
▷ Maximum class complexity5.00
Average method complexity1.43
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods14
▷ Static methods214.29%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

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
There are no PNG files in this plugin