83% easy-digital-downloads-related-downloads

Code Review | Easy Digital Downloads - Related Downloads

WordPress plugin Easy Digital Downloads - Related Downloads scored 83% from 54 tests.

About plugin

  • Plugin page: easy-digital-down...
  • Plugin version: 1.7.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8+
  • WordPress version: 5.9.2
  • First release: Apr 5, 2013
  • Latest release: Aug 30, 2020
  • Number of updates: 65
  • Update frequency: every 41.6 days
  • Top authors: isabel104 (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

500+ active / 20,164 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.00MB] [CPU: ▼291.97ms] Passed 4 tests

Analyzing server-side resources used by Easy Digital Downloads - Related Downloads
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.0558.45 ▲8.45
Dashboard /wp-admin3.43 ▲0.0333.17 ▲1.51
Posts /wp-admin/edit.php3.66 ▲0.0236.55 ▲3.65
Add New Post /wp-admin/post-new.php6.90 ▼0.0794.02 ▼1,170.22
Media Library /wp-admin/upload.php3.31 ▲0.0125.45 ▼2.83

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 1 new option
New WordPress options
widget_edd_related_downloads_widget

Browser metrics Passed 4 tests

Easy Digital Downloads - Related Downloads: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,763 ▲915.98 ▲0.385.95 ▲0.102.41 ▲0.01
Dashboard /wp-admin2,895 ▲376.15 ▼0.02116.51 ▼16.70153.68 ▼8.48
Posts /wp-admin/edit.php2,694 ▼03.24 ▲0.0061.72 ▼2.41138.69 ▼2.67
Add New Post /wp-admin/post-new.php1,752 ▲11921.75 ▲2.49464.67 ▲85.67156.25 ▼2.79
Media Library /wp-admin/upload.php1,701 ▲35.52 ▲0.02143.75 ▼0.55185.62 ▼5.52

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 1 option in the database
    • widget_edd_related_downloads_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/easy-digital-downloads-related-downloads/edd-related-downloads.php:41
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/easy-digital-downloads-related-downloads/widget-edd-related.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Tested up to: Invalid plugin version format
You can take inspiration from this readme.txt

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

The primary PHP file in "Easy Digital Downloads - Related Downloads" version 1.7.1 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("easy-digital-downloads-related-downloads.php" instead of "edd-related-downloads.php")
  • Domain Path: The domain path must begin with a forward slash character ("/languages")
  • Domain Path: You should use only dashes and lowercase characters for the domain path ("languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected246 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP23658245
CSS1001

PHP code Passed 2 tests

An short overview of 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.43
Average class complexity20.50
▷ Minimum class complexity19.00
▷ Maximum class complexity22.00
Average method complexity4.25
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods12
▷ Static methods18.33%
▷ Public methods1191.67%
▷ Protected methods00.00%
▷ Private methods18.33%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin