77% awesome-checkout-templates

Code Review | Awesome Checkout Templates

WordPress plugin Awesome Checkout Templates scored77%from 54 tests.

About plugin

  • Plugin page: awesome-checkout-...
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-6.2
  • WordPress version: 6.3.1
  • First release: Jun 5, 2020
  • Latest release: Mar 18, 2023
  • Number of updates: 14
  • Update frequency: every 72.6 days
  • Top authors: coder426 (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /4,818 total downloads

Benchmarks

Plugin footprint 83% 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.30MB] [CPU: ▲1.05ms] Passed 4 tests

An overview of server-side resources used by Awesome Checkout Templates
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.31 ▼0.1532.88 ▼4.48
Dashboard /wp-admin3.73 ▲0.4356.50 ▲10.10
Posts /wp-admin/edit.php3.83 ▲0.4848.60 ▲3.24
Add New Post /wp-admin/post-new.php6.37 ▲0.4888.91 ▼2.52
Media Library /wp-admin/upload.php3.66 ▲0.4342.58 ▲7.96
All Templates /wp-admin/edit.php?post_type=awesome_checkout3.6941.24
Settings /wp-admin/edit.php?post_type=awesome_checkout&page=awesome-checkout-settings3.6339.17
Create Checkout Template /wp-admin/post-new.php?post_type=awesome_checkout4.0552.99

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 33 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Awesome Checkout Templates
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,487 ▼28414.43 ▲0.160.53 ▼1.4519.49 ▼24.53
Dashboard /wp-admin2,240 ▲554.86 ▼0.99100.39 ▼0.1641.11 ▼1.67
Posts /wp-admin/edit.php2,120 ▲311.99 ▼0.0635.88 ▼7.1832.35 ▲3.98
Add New Post /wp-admin/post-new.php1,539 ▲617.44 ▼5.82641.07 ▼24.5273.63 ▲17.07
Media Library /wp-admin/upload.php1,419 ▲314.23 ▲0.0594.74 ▼7.5047.66 ▲6.99
All Templates /wp-admin/edit.php?post_type=awesome_checkout1,1192.3444.5131.28
Settings /wp-admin/edit.php?post_type=awesome_checkout&page=awesome-checkout-settings9522.2533.4528.96
Create Checkout Template /wp-admin/post-new.php?post_type=awesome_checkout5,24611.18282.0248.69

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
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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
The following issues need your attention
  • 15× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/awesome-checkout-templates/includes/admin_temp_setting/wacout_layout_form_fld.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/awesome-checkout-templates/includes/wacout-shortcode.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wacout_get_post_meta_using_id() in wp-content/plugins/awesome-checkout-templates/templates/template-2.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/awesome-checkout-templates/includes/include-script.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/awesome-checkout-templates/includes/custom-column.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wacout_get_post_meta_using_id() in wp-content/plugins/awesome-checkout-templates/templates/template-1.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/awesome-checkout-templates/index.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/awesome-checkout-templates/includes/meta-box.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/awesome-checkout-templates/includes/general-function.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/awesome-checkout-templates/includes/admin_temp_setting/wacout_cstm_sec_html.php:2

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following browser errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=awesome_checkout
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: jQuery(...).select2 is not a function" "TypeError: jQuery(...).select2 is not a function\n at wacout_product_search_init (/wp-content/plugins/awesome-checkout-templates/admin/js/admin.js?ver=1.1:172:35)\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/awesome-checkout-templates/admin/js/admin.js?ver=1.1:114:2)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=awesome_checkout
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught TypeError: jQuery(...).select2 is not a function

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
These attributes need your attention: You can take inspiration from this readme.txt

awesome-checkout-templates/index.php 77% from 13 tests

The main PHP script in "Awesome Checkout Templates" version 1.0.3 is automatically included on every request by WordPress
You should first fix the following items:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Description: The description should be shorter than 140 characters (currently 318 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("awesome-checkout-templates.php" instead of "index.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
There were no executable files found in this plugin15,426 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
CSS51,2917911,437
PHP156422603,130
PO File2222246466
JavaScript58049393

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.50
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%
Functions47
▷ Named functions47100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.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
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/images/ui-icons_444444_256x240.png6.84KB4.18KB▼ 38.90%