83% easy-digital-downloads-empty-cart

Code Review | Easy Digital Downloads - Empty Cart

WordPress plugin Easy Digital Downloads - Empty Cart scored83%from 54 tests.

About plugin

  • Plugin page: easy-digital-down...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9.2-4.6
  • WordPress version: 6.3.1
  • First release: Jun 13, 2015
  • Latest release: Jun 25, 2016
  • Number of updates: 7
  • Update frequency: every 54.1 days
  • Top authors: sdavis2702 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /3,319 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼5.64ms] Passed 4 tests

This is a short check of server-side resources used by Easy Digital Downloads - Empty Cart
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0146.24 ▲6.20
Dashboard /wp-admin3.32 ▲0.0151.15 ▲2.57
Posts /wp-admin/edit.php3.37 ▲0.0149.16 ▼2.22
Add New Post /wp-admin/post-new.php5.90 ▲0.0191.40 ▼18.54
Media Library /wp-admin/upload.php3.24 ▲0.0135.52 ▼4.36

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Easy Digital Downloads - Empty Cart
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲5013.24 ▼1.072.28 ▲0.5146.90 ▲0.81
Dashboard /wp-admin2,210 ▲225.82 ▲0.9598.72 ▼10.6142.73 ▼1.47
Posts /wp-admin/edit.php2,095 ▲62.13 ▲0.0739.84 ▼0.8135.72 ▼1.10
Add New Post /wp-admin/post-new.php1,540 ▼13723.03 ▼1.32581.86 ▼2.3262.55 ▲15.54
Media Library /wp-admin/upload.php1,395 ▲74.19 ▼0.0395.71 ▲0.6442.82 ▼0.05

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

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
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/easy-digital-downloads-empty-cart/includes/settings.php:12

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 issues were found

Optimizations

Plugin configuration 90% 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
5 plugin tags: easy digital downloads, ecommerce, edd, shopping cart, checkout

easy-digital-downloads-empty-cart/edd-empty-cart.php 77% from 13 tests

The main PHP script in "Easy Digital Downloads - Empty Cart" version 1.0.2 is automatically included on every request by WordPress
It is important to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 170 characters long)
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("easy-digital-downloads-empty-cart.php" instead of "edd-empty-cart.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
Everything looks great! No dangerous files found in this plugin169 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP458139169

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods8
▷ Static methods112.50%
▷ Public methods562.50%
▷ Protected methods00.00%
▷ Private methods337.50%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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 are no PNG files in this plugin