83% free-downloads-edd

Code Review | Free Downloads EDD

WordPress plugin Free Downloads EDD scored 83% from 54 tests.

About plugin

  • Plugin page: free-downloads-edd
  • Plugin version: 1.0.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.9.4
  • WordPress version: 5.8.1
  • First release: Feb 21, 2018
  • Latest release: Aug 28, 2018
  • Number of updates: 9
  • Update frequency: every 20.9 days
  • Top authors: squareonemedia (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active / 2,003 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.50MB] [CPU: ▼137.41ms] Passed 4 tests

Analyzing server-side resources used by Free Downloads EDD
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.35 ▲0.6333.75 ▲14.31
Dashboard /wp-admin3.60 ▲0.5440.67 ▼1.83
Posts /wp-admin/edit.php3.65 ▲0.5442.75 ▲0.96
Add New Post /wp-admin/post-new.php5.89 ▲0.4693.02 ▼547.37
Media Library /wp-admin/upload.php3.47 ▲0.4634.96 ▼1.39
Free Downloads /wp-admin/edit.php?post_type=download&page=download_now_dashboard3.2624.84

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 53 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Free Downloads EDD
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,817 ▲22116.27 ▲0.6015.49 ▲4.8949.74 ▲5.37
Dashboard /wp-admin2,975 ▲446.03 ▲0.02135.24 ▼9.16116.34 ▼0.55
Posts /wp-admin/edit.php2,741 ▲52.84 ▲0.0063.52 ▼0.1995.14 ▲9.62
Add New Post /wp-admin/post-new.php1,685 ▲218.71 ▲0.17368.54 ▲11.38113.71 ▼5.29
Media Library /wp-admin/upload.php1,812 ▲55.02 ▲0.01145.08 ▼6.30117.50 ▼18.54
Free Downloads /wp-admin/edit.php?post_type=download&page=download_now_dashboard280.900.0511.52

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > Warning in wp-content/plugins/free-downloads-edd/includes/somdn-file-functions.php+31
    rmdir(wp-content/uploads/download-now-uploads/): Directory not empty

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

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

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/edit.php?post_type=download&page=download_now_dashboard
    • > Network (severe)
    wp-admin/edit.php?post_type=download&page=download_now_dashboard - Failed to load resource: the server responded with a status of 403 (Forbidden)


Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
Please take inspiration from this readme.txt

free-downloads-edd/som-free-downloads-edd.php 92% from 13 tests

The primary PHP file in "Free Downloads EDD" version 1.0.3 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("free-downloads-edd.php" instead of "som-free-downloads-edd.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin3,750 lines of code in 32 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.45
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
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions176100.00%
▷ Anonymous functions00.00%
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
16 PNG files occupy 1.70MB with 1.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
edd-files/images/somdn_edd_02.png374.00KB95.92KB▼ 74.35%
assets/images/multi-4.png5.91KB3.74KB▼ 36.71%
edd-files/images/somdn_edd_checkboxes.png313.09KB82.32KB▼ 73.71%
assets/images/somfrp.png18.49KB7.80KB▼ 57.82%
assets/images/pdf-viewer.png37.69KB14.23KB▼ 62.24%