78% edd-better-checkout-cart

Code Review | EDD Better Checkout Cart

WordPress plugin EDD Better Checkout Cart scored78%from 54 tests.

About plugin

  • Plugin page: edd-better-checko...
  • Plugin version: 2.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-5.0.3
  • WordPress version: 6.3.1
  • First release: May 5, 2016
  • Latest release: Jan 23, 2019
  • Number of updates: 8
  • Update frequency: every 124.1 days
  • Top authors: rotello (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,627 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.04MB] [CPU: ▼10.23ms] Passed 4 tests

An overview of server-side resources used by EDD Better Checkout Cart
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0642.63 ▼5.34
Dashboard /wp-admin3.36 ▲0.0154.69 ▼9.85
Posts /wp-admin/edit.php3.41 ▲0.0551.56 ▼2.79
Add New Post /wp-admin/post-new.php5.94 ▲0.0587.99 ▼22.94
Media Library /wp-admin/upload.php3.28 ▲0.0539.22 ▲2.39

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 9 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
eddbc_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for EDD Better Checkout Cart
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5414.27 ▲0.022.21 ▲0.5943.12 ▼3.87
Dashboard /wp-admin2,216 ▲365.59 ▼0.0496.31 ▲0.5342.61 ▲2.02
Posts /wp-admin/edit.php2,118 ▲182.01 ▼0.0135.80 ▼5.7536.82 ▼1.22
Add New Post /wp-admin/post-new.php1,541 ▲1323.36 ▲0.11639.73 ▼38.3554.99 ▼6.04
Media Library /wp-admin/upload.php1,421 ▲184.18 ▲0.0299.82 ▼5.4641.54 ▼3.68

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
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget

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
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/edd-better-checkout-cart/edd-better-checkout-cart-free.php
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function edd_is_ajax_disabled() in wp-content/plugins/edd-better-checkout-cart/edd_templates/checkout_cart.php:7

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 errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Tags: Please reduce the number of tags, currently 16 tag instead of maximum 10
The official readme.txt is a good inspiration

edd-better-checkout-cart/edd-better-checkout-cart-free.php 85% from 13 tests

The entry point to "EDD Better Checkout Cart" version 2.0.3 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 574 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("edd-better-checkout-cart.php" instead of "edd-better-checkout-cart-free.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin420 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP23917328
CSS420186
JavaScript1106

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.29
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%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin