77% autopopulate-checkout-for-woocommerce

Code Review | Autopopulate Checkout for Woocommerce

WordPress plugin Autopopulate Checkout for Woocommerce scored77%from 54 tests.

About plugin

  • Plugin page: autopopulate-chec...
  • Plugin version: 1.0.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.9.1
  • WordPress version: 6.3.1
  • First release: Aug 7, 2020
  • Latest release: Mar 15, 2022
  • Number of updates: 18
  • Update frequency: every 32.5 days
  • Top authors: wpconcierges (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /581 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.20MB] [CPU: ▼2.28ms] Passed 4 tests

This is a short check of server-side resources used by Autopopulate Checkout for Woocommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1841.62 ▼6.91
Dashboard /wp-admin3.52 ▲0.2154.87 ▲1.62
Posts /wp-admin/edit.php3.64 ▲0.2756.47 ▲1.76
Add New Post /wp-admin/post-new.php6.10 ▲0.2194.77 ▼5.60
Media Library /wp-admin/upload.php3.44 ▲0.2139.21 ▲3.48
AutoPopulate Checkout for Woo /wp-admin/tools.php?page=autopopulate-checkout-woo3.4233.87

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Autopopulate Checkout for Woocommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲4714.33 ▼0.321.78 ▼0.0145.11 ▼2.94
Dashboard /wp-admin2,199 ▲225.61 ▼0.0493.53 ▲3.6142.32 ▼1.82
Posts /wp-admin/edit.php2,104 ▲42.02 ▲0.0836.42 ▼3.4533.66 ▲1.92
Add New Post /wp-admin/post-new.php1,529 ▲123.20 ▼0.10694.03 ▲8.9656.01 ▲6.72
Media Library /wp-admin/upload.php1,404 ▲44.21 ▲0.0199.27 ▼14.0343.77 ▼0.48
AutoPopulate Checkout for Woo /wp-admin/tools.php?page=autopopulate-checkout-woo1,0662.0021.8027.97

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
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/autopopulate-checkout-for-woocommerce/admin/partials/autopopulate-checkout-woo-admin-display.php
    • > /wp-content/plugins/autopopulate-checkout-for-woocommerce/public/partials/autopopulate-checkout-woo-public-display.php
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/autopopulate-checkout-for-woocommerce/admin/partials/autopopulate-checkout-woo-admin-field-text.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/autopopulate-checkout-for-woocommerce/admin/partials/autopopulate-checkout-woo-admin-field-select.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/autopopulate-checkout-for-woocommerce/admin/partials/autopopulate-checkout-woo-admin-field-checkbox.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/autopopulate-checkout-for-woocommerce/admin/partials/autopopulate-checkout-woo-admin-field-textarea.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/autopopulate-checkout-for-woocommerce/admin/partials/autopopulate-checkout-woo-admin-section-messages.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/autopopulate-checkout-for-woocommerce/admin/partials/autopopulate-checkout-woo-admin-page-settings.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
4 plugin tags: autopopulate checkout, prefill checkout, woocommerce checkout, woocommerce

autopopulate-checkout-for-woocommerce/autopopulate-checkout-woo.php 69% from 13 tests

This is the main PHP file of "Autopopulate Checkout for Woocommerce" version 1.0.7, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Requires at least: Required version must match the one declared in readme.txt ("3.0.1" instead of "3.0")
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("autopopulate-checkout-for-woocommerce.php" instead of "autopopulate-checkout-woo.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Description: The description should be shorter than 140 characters (currently 155 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin930 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP19405722927
JavaScript12273
CSS1040

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity18.25
▷ Minimum class complexity1.00
▷ Maximum class complexity87.00
Average method complexity3.56
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods54
▷ Static methods35.56%
▷ Public methods3768.52%
▷ Protected methods11.85%
▷ Private methods1629.63%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin