78% woo-single-page-checkout

Code Review | WooCommerce Single Page Checkout

WordPress plugin WooCommerce Single Page Checkout scored78%from 54 tests.

About plugin

  • Plugin page: woo-single-page-c...
  • Plugin version: 1.2.7
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.1-5.5.3
  • WordPress version: 6.3.1
  • First release: Jan 31, 2018
  • Latest release: Feb 6, 2021
  • Number of updates: 45
  • Update frequency: every 25.1 days
  • Top authors: brijrajs (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

5,000+ active /104,623 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼1.94ms] Passed 4 tests

Analyzing server-side resources used by WooCommerce Single Page Checkout
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0039.24 ▼0.89
Dashboard /wp-admin3.31 ▲0.0143.91 ▼6.56
Posts /wp-admin/edit.php3.36 ▲0.0147.45 ▲0.42
Add New Post /wp-admin/post-new.php5.89 ▲0.0193.12 ▼0.73
Media Library /wp-admin/upload.php3.23 ▲0.0034.99 ▲1.50
Checkout Settings /wp-admin/options-general.php?page=one_settings3.1730.52

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

WooCommerce Single Page Checkout: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,835 ▲6413.36 ▼0.871.98 ▼0.1144.71 ▼3.33
Dashboard /wp-admin2,216 ▲285.03 ▼0.8997.66 ▼15.4538.67 ▼8.85
Posts /wp-admin/edit.php2,096 ▲72.06 ▲0.0440.60 ▲4.6235.10 ▼1.62
Add New Post /wp-admin/post-new.php1,520 ▲117.85 ▼5.27652.52 ▲20.5353.03 ▲7.94
Media Library /wp-admin/upload.php1,395 ▲74.28 ▲0.1198.53 ▲0.0644.97 ▲0.06
Checkout Settings /wp-admin/options-general.php?page=one_settings8442.0224.2628.33

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=one_settings
    • > Notice in wp-content/plugins/woo-single-page-checkout/includes/setting.php+55
    Undefined variable: rg_billing

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 take a closer look at the following
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-single-page-checkout/includes/setting.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/woo-single-page-checkout/includes/functions.php:2

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Tags: Please reduce the number of tags, currently 30 tag instead of maximum 10
  • Screenshots: Add an image for screenshot #1 (Admin interface & display .)
Please take inspiration from this readme.txt

woo-single-page-checkout/rg108-woocommerce-single-page-checkout.php 92% from 13 tests

The main PHP file in "WooCommerce Single Page Checkout" ver. 1.2.7 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("woo-single-page-checkout.php" instead of "rg108-woocommerce-single-page-checkout.php")

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
No dangerous file extensions were detected163 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP62419141
PO File15422

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin