78% simpler-checkout

Code Review | Simpler Checkout

WordPress plugin Simpler Checkout scored78%from 54 tests.

About plugin

  • Plugin page: simpler-checkout
  • Plugin version: 0.7.6
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-6.1
  • WordPress version: 6.3.1
  • First release: Sep 27, 2021
  • Latest release: Oct 18, 2023
  • Number of updates: 42
  • Update frequency: every 18.0 days
  • Top authors: simplercheckout (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

40+ active /3,518 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.01MB] [CPU: ▼5.92ms] Passed 4 tests

A check of server-side resources used by Simpler Checkout
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0140.37 ▲0.86
Dashboard /wp-admin3.32 ▲0.0146.77 ▼1.06
Posts /wp-admin/edit.php3.37 ▲0.0143.59 ▼2.47
Add New Post /wp-admin/post-new.php5.90 ▲0.0182.74 ▼18.19
Media Library /wp-admin/upload.php3.24 ▲0.0135.03 ▼1.95

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 90 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Simpler Checkout: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,792 ▲3114.35 ▲0.001.62 ▼0.1639.51 ▲0.45
Dashboard /wp-admin2,198 ▲175.51 ▼0.2183.73 ▼16.8140.86 ▲1.65
Posts /wp-admin/edit.php2,103 ▲32.02 ▲0.0133.23 ▼3.0332.63 ▼1.36
Add New Post /wp-admin/post-new.php1,529 ▲323.18 ▲0.02663.48 ▼17.4756.60 ▼2.14
Media Library /wp-admin/upload.php1,406 ▲34.17 ▲0.0596.34 ▼17.4140.84 ▼7.27

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
Please fix the following items
  • 6× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/simpler-checkout/includes/Admin/assets/views/settings/_shortcodes.blade.php
    • > /wp-content/plugins/simpler-checkout/includes/Admin/assets/views/settings/configuration/_settings.blade.php
    • > /wp-content/plugins/simpler-checkout/includes/Admin/assets/views/settings/offers/_form.blade.php
    • > /wp-content/plugins/simpler-checkout/includes/Admin/assets/views/_home.blade.php
    • > /wp-content/plugins/simpler-checkout/includes/Admin/assets/views/settings/_button.blade.php
    • > /wp-content/plugins/simpler-checkout/includes/Admin/assets/views/settings/configuration/_status.blade.php
  • 31× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simpler-checkout/includes/button.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simpler-checkout/includes/hooks.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Simpler\\Http\\Controllers\\Controller' not found in wp-content/plugins/simpler-checkout/includes/Http/Controllers/QuotationController.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Simpler\\Exceptions\\BaseException' not found in wp-content/plugins/simpler-checkout/includes/Exceptions/InvalidProductException.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Simpler\\Http\\Controllers\\Controller' not found in wp-content/plugins/simpler-checkout/includes/Http/Controllers/OrderQuoteController.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Simpler\\Http\\Controllers\\Controller' not found in wp-content/plugins/simpler-checkout/includes/Http/Controllers/OrderController.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Simpler\\Http\\Controllers\\Controller' not found in wp-content/plugins/simpler-checkout/includes/Http/Controllers/OrderCreateController.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Simpler\\Exceptions\\BaseException' not found in wp-content/plugins/simpler-checkout/includes/Exceptions/InapplicableCouponException.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Simpler\\Exceptions\\BaseException' not found in wp-content/plugins/simpler-checkout/includes/Exceptions/IndividuallySoldProductException.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Simpler\\Exceptions\\BaseException' not found in wp-content/plugins/simpler-checkout/includes/Exceptions/OutOfStockProductException.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
10 plugin tags: simpler checkout, login, authentication, 1click checkout, woocommerce...

simpler-checkout/simpler.php 85% from 13 tests

"Simpler Checkout" version 0.7.6's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Description: Please keep the plugin description shorter than 140 characters (currently 157 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("simpler-checkout.php" instead of "simpler.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected7,393 lines of code in 86 files:
LanguageFilesBlank linesComment linesLines of code
PHP771,1782,9386,603
Blade6110296
CSS1373256
JavaScript1470233
JSON1005

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.32
Average class complexity10.63
▷ Minimum class complexity1.00
▷ Maximum class complexity316.00
Average method complexity2.09
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces10
Interfaces0
Traits2
Classes58
▷ Abstract classes23.45%
▷ Concrete classes5696.55%
▷ Final classes1323.21%
Methods507
▷ Static methods458.88%
▷ Public methods33365.68%
▷ Protected methods11823.27%
▷ Private methods5611.05%
Functions102
▷ Named functions7371.57%
▷ Anonymous functions2928.43%
Constants32
▷ Global constants412.50%
▷ Class constants2887.50%
▷ Public constants28100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected