10% wordpress-checkout

Code Review | Wordpress Checkout

WordPress plugin Wordpress Checkout scored10%from 54 tests.

About plugin

  • Plugin page: wordpress-checkout
  • Plugin version: 1.2.3.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-3.9
  • WordPress version: 6.3.1
  • First release: Jan 29, 2010
  • Latest release: Apr 20, 2014
  • Number of updates: 40
  • Update frequency: every 38.6 days
  • Top authors: alaingg (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /10,599 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
It is recommended to fix the following installer errors
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/wordpress-checkout/includes/classes/class.wpckt-widget.php+9
    Function create_function() is deprecated

Server metrics [RAM: ▼1.84MB] [CPU: ▼57.86ms] Passed 4 tests

Server-side resources used by Wordpress Checkout
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.15 ▼1.315.38 ▼39.06
Dashboard /wp-admin2.17 ▼1.136.80 ▼51.25
Posts /wp-admin/edit.php2.17 ▼1.199.28 ▼40.39
Add New Post /wp-admin/post-new.php2.17 ▼3.725.83 ▼100.74
Media Library /wp-admin/upload.php2.17 ▼1.067.27 ▼28.42
Settings /wp-admin/admin.php?page=wpckt_settings2.176.65
Orders /wp-admin/admin.php?page=wpckt_orders2.177.54

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 42 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_wpckt_widget
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Wordpress Checkout
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,817 ▲5614.72 ▲0.121.98 ▼0.1145.69 ▼2.03
Dashboard /wp-admin2,212 ▲355.56 ▼0.0582.74 ▼12.0757.82 ▲18.23
Posts /wp-admin/edit.php2,129 ▲261.98 ▼0.0238.76 ▼0.6432.87 ▼4.80
Add New Post /wp-admin/post-new.php1,568 ▲3819.42 ▼3.70709.06 ▲46.2660.28 ▼3.82
Media Library /wp-admin/upload.php1,429 ▲324.15 ▼0.04106.30 ▲4.2369.10 ▲19.90
Settings /wp-admin/admin.php?page=wpckt_settings2,3108.70175.6676.24
Orders /wp-admin/admin.php?page=wpckt_orders8191.6523.7224.21

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/wordpress-checkout/includes/classes/class.wpckt-widget.php+9
    Function create_function() is deprecated
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_wpckt_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wpckt_orders
    • > Deprecated in wp-content/plugins/wordpress-checkout/includes/classes/class.wpckt-widget.php+9
    Function create_function() is deprecated

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
Please fix the following
  • 7× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wordpress-checkout/presentation/default/functions.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/wordpress-checkout/wp-checkout.php:29
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/wordpress-checkout/includes/functions.php:130
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wordpress-checkout/includes/classes/class.wpckt-widget.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wordpress-checkout/includes/cart.php:12
    • > PHP Fatal error
      Uncaught Error: Class '_WP_Editors' not found in wp-content/plugins/wordpress-checkout/includes/tinymce/wpcheckout/langs/wp-langs.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wordpress-checkout/includes/admin.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Tags: There are too many tags (13 tag instead of maximum 10)
You can look at the official readme.txt

wordpress-checkout/wp-checkout.php 92% from 13 tests

The primary PHP file in "Wordpress Checkout" version 1.2.3.0 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wordpress-checkout.php" instead of "wp-checkout.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin6,679 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
PHP128936782,341
HTML136202,023
PO File47241,0081,714
JavaScript614674492
CSS22518109

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity13.17
▷ Minimum class complexity7.00
▷ Maximum class complexity24.00
Average method complexity2.74
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods42
▷ Static methods49.52%
▷ Public methods3992.86%
▷ Protected methods24.76%
▷ Private methods12.38%
Functions57
▷ Named functions57100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants675.00%
▷ Class constants225.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
8 compressed PNG files occupy 0.02MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/tinymce/wpcheckout/img/wp_checkout_label_edit.png0.72KB0.69KB▼ 4.31%
assets/images/shopping-cart-sm-icon.png0.51KB0.63KB0.00%
assets/images/shopping-cart-sm-icon-white.png0.55KB0.64KB0.00%
includes/tinymce/wpcheckout/img/delete.png1.35KB1.34KB▼ 0.65%
assets/images/wp_checkout_label.png3.64KB2.38KB▼ 34.65%