83% checkout-add-on-woo-onepage

Code Review | Checkout Add-on for Woo OnePage - Lite

WordPress plugin Checkout Add-on for Woo OnePage - Lite scored83%from 54 tests.

About plugin

  • Plugin page: checkout-add-on-w...
  • Plugin version: 0.9
  • PHP compatiblity: 5.4.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.2
  • WordPress version: 6.3.1
  • First release: Nov 8, 2019
  • Latest release: Nov 14, 2019
  • Number of updates: 4
  • Update frequency: every 1.8 days
  • Top authors: amadercode (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /910 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
Install script ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼10.28ms] Passed 4 tests

Analyzing server-side resources used by Checkout Add-on for Woo OnePage - Lite
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0123.82 ▼22.16
Dashboard /wp-admin3.37 ▲0.0649.70 ▼8.17
Posts /wp-admin/edit.php3.48 ▲0.1247.98 ▲0.98
Add New Post /wp-admin/post-new.php5.95 ▲0.0689.04 ▼10.69
Media Library /wp-admin/upload.php3.29 ▲0.0635.75 ▼0.10

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Checkout Add-on for Woo OnePage - Lite
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,482 ▼27914.21 ▼0.160.51 ▼1.3120.40 ▼24.48
Dashboard /wp-admin2,203 ▲235.53 ▼0.1587.34 ▼2.4244.09 ▲4.97
Posts /wp-admin/edit.php2,114 ▲111.94 ▼0.0834.33 ▼9.1136.67 ▼1.28
Add New Post /wp-admin/post-new.php1,388 ▼14920.57 ▼2.47582.11 ▼59.1265.53 ▼0.44
Media Library /wp-admin/upload.php1,417 ▲174.18 ▼0.0296.83 ▼15.0440.71 ▼4.23

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
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 50% 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 trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_shortcode() in wp-content/plugins/checkout-add-on-woo-onepage/templates/checkout.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/checkout-add-on-woo-onepage/woo-onepage-checkout.php:23

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Screenshots: Add an image for screenshot #3 (Floating Shopping Cart for Woo OnePage)
The official readme.txt is a good inspiration

checkout-add-on-woo-onepage/woo-onepage-checkout.php 85% from 13 tests

The entry point to "Checkout Add-on for Woo OnePage - Lite" version 0.9 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("checkout-add-on-woo-onepage.php" instead of "woo-onepage-checkout.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin391 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP643174234
Sass113180
CSS13171
JavaScript4006

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity3.33
▷ Minimum class complexity1.00
▷ Maximum class complexity6.00
Average method complexity1.37
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods19
▷ Static methods15.26%
▷ Public methods1684.21%
▷ Protected methods00.00%
▷ Private methods315.79%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants12
▷ Global constants12100.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
There were not PNG files found in your plugin