83% wc-premium-checkout

Code Review | WPC - Checkout Editor for WooCommerce

WordPress plugin WPC - Checkout Editor for WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: wc-premium-checkout
  • Plugin version: 2.0.1
  • PHP compatiblity: 7.2.33+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2.1-5.6.0
  • WordPress version: 6.3.1
  • First release: Oct 24, 2020
  • Latest release: Jan 13, 2021
  • Number of updates: 14
  • Update frequency: every 6.4 days
  • Top authors: williansantana (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /675 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.23MB] [CPU: ▼1.41ms] Passed 4 tests

Analyzing server-side resources used by WPC - Checkout Editor for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.68 ▲0.2246.21 ▲7.50
Dashboard /wp-admin3.57 ▲0.2755.15 ▲3.75
Posts /wp-admin/edit.php3.62 ▲0.2750.65 ▼5.45
Add New Post /wp-admin/post-new.php6.09 ▲0.2188.74 ▼11.42
Media Library /wp-admin/upload.php3.44 ▲0.2145.19 ▲9.35

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for WPC - Checkout Editor for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲6914.47 ▲0.171.75 ▼0.0543.92 ▲0.04
Dashboard /wp-admin2,212 ▲245.83 ▼0.04105.25 ▼5.0945.17 ▲4.38
Posts /wp-admin/edit.php2,104 ▲122.02 ▲0.0534.48 ▼5.6338.78 ▲1.60
Add New Post /wp-admin/post-new.php1,551 ▲3223.12 ▼0.03678.28 ▼4.1457.25 ▲3.01
Media Library /wp-admin/upload.php1,403 ▲154.22 ▼0.05110.19 ▲4.3749.94 ▲3.70

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking 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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 28× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wc-premium-checkout/app/hooks.php:6
    • > PHP Warning
      Use of undefined constant WPC_VERSION - assumed 'WPC_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/wc-premium-checkout/app/setup/view/partials/html-admin-partial-intro.php on line 10
    • > PHP Fatal error
      Uncaught Error: Class 'WPC\\Abstract_Addon' not found in wp-content/plugins/wc-premium-checkout/app/inc/Addons/wpc-onepage-checkout/class-wpc-theme-onepage-checkout.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Customize_Control' not found in wp-content/plugins/wc-premium-checkout/app/inc/Controls/wpc-typography/class-wpc-control-typography.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WPC\\Abstract_Addon' not found in wp-content/plugins/wc-premium-checkout/app/inc/Addons/wpc-typography-settings/class-wpc-extension-typography-settings.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/wc-premium-checkout/app/setup/view/template/html-wpc-default-template.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Customize_Control' not found in wp-content/plugins/wc-premium-checkout/app/inc/Controls/wpc-heading/class-wpc-control-heading.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/wc-premium-checkout/app/setup/view/callback/html-admin-callback-page.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wc-premium-checkout/app/setup/view/html-admin-notice.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'WPC\\Abstract_Addon' not found in wp-content/plugins/wc-premium-checkout/app/inc/Addons/wpc-theme-selector/class-wpc-extension-theme-selector.php:5

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 79% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Screenshots: These screenshots lack descriptions #2, #3 in wc-premium-checkout/assets to your readme.txt
  • Tags: You are using too many tags: 11 tag instead of maximum 10
You can look at the official readme.txt

wc-premium-checkout/bootstrap.php 69% from 13 tests

"WPC - Checkout Editor for WooCommerce" version 2.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase
  • Description: Please keep the plugin description shorter than 140 characters (currently 169 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("wc-premium-checkout.php" instead of "bootstrap.php")
  • Requires at least: The required version number must match the one declared in readme.txt ("5.5.1" instead of "4.2.1")

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
Success! There were no dangerous files found in this plugin16,027 lines of code in 113 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript221,6174166,277
PHP701,1968195,235
CSS164152274,158
PO File1131149353
SVG4004

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity13.68
▷ Minimum class complexity1.00
▷ Maximum class complexity100.00
Average method complexity2.72
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces5
Interfaces0
Traits1
Classes21
▷ Abstract classes14.76%
▷ Concrete classes2095.24%
▷ Final classes420.00%
Methods148
▷ Static methods74.73%
▷ Public methods14698.65%
▷ Protected methods00.00%
▷ Private methods21.35%
Functions96
▷ Named functions8083.33%
▷ Anonymous functions1616.67%
Constants11
▷ Global constants11100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
app/inc/Addons/wpc-onepage-checkout/assets/img/screenshot.png33.67KB12.61KB▼ 62.53%
app/assets/img/logo.png4.80KB2.55KB▼ 46.85%