73% free-downloads-edd

Code Review | Free Downloads EDD

WordPress plugin Free Downloads EDD scored73%from 54 tests.

About plugin

  • Plugin page: free-downloads-edd
  • Plugin version: 1.0.4
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.1.1
  • WordPress version: 6.3.1
  • First release: Feb 21, 2018
  • Latest release: Mar 8, 2023
  • Number of updates: 10
  • Update frequency: every 184.1 days
  • Top authors: squareonemedia (90%)wpenhanced (20%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active /2,985 total downloads

Benchmarks

Plugin footprint 65% 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.48MB] [CPU: ▼9.91ms] 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.99 ▲0.5237.43 ▼0.82
Dashboard /wp-admin3.84 ▲0.4946.49 ▼13.81
Posts /wp-admin/edit.php3.89 ▲0.5348.36 ▼2.27
Add New Post /wp-admin/post-new.php6.36 ▲0.4782.40 ▼22.74
Media Library /wp-admin/upload.php3.70 ▲0.4637.29 ▲1.84
Free Downloads /wp-admin/edit.php?post_type=download&page=download_now_dashboard3.5128.93

Server storage [IO: ▲2.01MB] [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, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
db_upgraded

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 /2,901 ▲14013.50 ▼0.858.69 ▲7.1445.36 ▲3.66
Dashboard /wp-admin2,200 ▲205.68 ▲0.0182.99 ▼1.8336.23 ▼8.02
Posts /wp-admin/edit.php2,102 ▲22.01 ▲0.0132.96 ▼6.2137.03 ▲0.01
Add New Post /wp-admin/post-new.php1,530 ▼123.42 ▲0.27654.82 ▲3.2354.42 ▲1.04
Media Library /wp-admin/upload.php1,405 ▲24.23 ▲0.0196.14 ▼1.9044.52 ▼2.36
Free Downloads /wp-admin/edit.php?post_type=download&page=download_now_dashboard280.420.073.56

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded

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)

Optimizations

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.4 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,744 lines of code in 32 files:
LanguageFilesBlank linesComment linesLines of code
PHP261,2454322,975
CSS43815699
JavaScript2191670

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
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%
Functions176
▷ Named functions176100.00%
▷ Anonymous functions00.00%
Constants7
▷ 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 0.92MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
edd-files/images/somdn_edd_download_count.png8.17KB5.29KB▼ 35.25%
assets/images/logo-white.png1.12KB0.12KB▼ 88.89%
edd-files/images/somdn_edd_02.png374.00KB95.92KB▼ 74.35%
assets/images/multi-4.png5.91KB3.74KB▼ 36.71%
assets/images/multi-5.png5.84KB3.73KB▼ 36.14%