84% easy-digital-downloads-clear-cart

Code Review | Easy Digital Downloads - Clear Cart

WordPress plugin Easy Digital Downloads - Clear Cart scored84%from 54 tests.

About plugin

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

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /1,809 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

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

This is a short check of server-side resources used by Easy Digital Downloads - Clear Cart
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0439.60 ▼2.34
Dashboard /wp-admin3.35 ▲0.0541.32 ▼3.72
Posts /wp-admin/edit.php3.47 ▲0.1144.18 ▼3.13
Add New Post /wp-admin/post-new.php5.93 ▲0.0574.97 ▼21.64
Media Library /wp-admin/upload.php3.28 ▲0.0538.60 ▲0.70

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Easy Digital Downloads - Clear Cart
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,832 ▲8613.24 ▼1.141.88 ▲0.0637.91 ▼2.10
Dashboard /wp-admin2,213 ▲245.85 ▲0.90111.65 ▲2.4244.88 ▲5.07
Posts /wp-admin/edit.php2,095 ▲62.01 ▼0.0335.13 ▼0.1132.83 ▼4.40
Add New Post /wp-admin/post-new.php1,540 ▲623.14 ▼0.19635.46 ▼48.3456.30 ▼9.07
Media Library /wp-admin/upload.php1,389 ▲14.18 ▼0.0898.76 ▼14.8944.83 ▼1.54

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/easy-digital-downloads-clear-cart/includes/settings.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: easy digital downloads, edd, shopping cart, ecommerce, checkout

easy-digital-downloads-clear-cart/edd-clear-cart.php 85% from 13 tests

Analyzing the main PHP file in "Easy Digital Downloads - Clear Cart" version 1.0.1
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("easy-digital-downloads-clear-cart.php" instead of "edd-clear-cart.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; 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 plugin172 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP442140170
Markdown1102

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
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.14
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods7
▷ Static methods114.29%
▷ Public methods571.43%
▷ Protected methods00.00%
▷ Private methods228.57%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected