78% easy-download

Code Review | Easy Download

WordPress plugin Easy Download scored 78% from 54 tests.

About plugin

  • Plugin page: easy-download
  • Plugin version: 1.2.7
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.3.1
  • WordPress version: 6.3.1
  • First release: Mar 2, 2023
  • Latest release: Sep 8, 2023
  • Number of updates: 22
  • Update frequency: every 8.6 days
  • Top authors: neoslab (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 389 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼6.01ms] Passed 4 tests

A check of server-side resources used by Easy Download
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1137.85 ▼7.45
Dashboard /wp-admin3.41 ▲0.1147.33 ▼3.31
Posts /wp-admin/edit.php3.52 ▲0.1747.94 ▼2.98
Add New Post /wp-admin/post-new.php5.99 ▲0.1089.29 ▼10.30
Media Library /wp-admin/upload.php3.33 ▲0.1039.60 ▲5.63
Add Form /wp-admin/admin.php?page=easy-download-form3.3134.88
Settings /wp-admin/admin.php?page=easy-download-options3.3233.59
Links /wp-admin/admin.php?page=easy-download-links3.3134.06

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 40 new files
Database: 1 new table, 8 new options
New tables
wp_downloads
New WordPress options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
_easy_download_options
theysaidso_admin_options
can_compress_scripts
_easy_download_links

Browser metrics Passed 4 tests

A check of browser resources used by Easy Download
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,833 ▲9813.28 ▼1.071.77 ▼0.0241.64 ▼1.08
Dashboard /wp-admin2,239 ▲575.80 ▼0.0497.20 ▼5.6839.68 ▼0.75
Posts /wp-admin/edit.php2,122 ▲362.02 ▲0.0239.82 ▲3.0534.93 ▲1.58
Add New Post /wp-admin/post-new.php1,560 ▲4623.34 ▲5.91674.43 ▲6.6856.65 ▲10.42
Media Library /wp-admin/upload.php1,412 ▲244.20 ▲0.02100.62 ▲6.0242.49 ▼1.55
Add Form /wp-admin/admin.php?page=easy-download-form8801.9136.6850.11
Settings /wp-admin/admin.php?page=easy-download-options9121.9136.3246.30
Links /wp-admin/admin.php?page=easy-download-links1,0812.5352.7054.44

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
    • > GET request to /wp-admin/admin.php?page=easy-download-links
    • > Warning in wp-content/plugins/easy-download/admin/partials/easy-download-admin-links.php+38
    Invalid argument supplied for foreach()

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/easy-download/admin/partials/easy-download-admin-links.php:15
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/easy-download/admin/partials/easy-download-admin-form.php:14
    • > PHP Fatal error
      Uncaught Error: Cannot access self:: when no class scope is active in wp-content/plugins/easy-download/admin/partials/easy-download-admin-options.php:22

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Screenshots: These screenshots require images: #1 (A general view of the plugin "options" page.), #2 (The form allowing you to add a new download link.), #3 (The table regrouping all the links that can be downloaded from your site.)
You can take inspiration from this readme.txt

easy-download/easy-download.php 92% from 13 tests

The main PHP file in "Easy Download" ver. 1.2.7 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 180 characters long)

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 plugin1,670 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
CSS511844739
PHP1495446714
JavaScript320217

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity7.29
▷ Minimum class complexity1.00
▷ Maximum class complexity30.00
Average method complexity2.22
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods36
▷ Static methods25.56%
▷ Public methods3186.11%
▷ Protected methods00.00%
▷ Private methods513.89%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
3 PNG files occupy 0.21MB with 0.15MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png61.30KB16.79KB▼ 72.60%
screenshot-1.png68.16KB18.68KB▼ 72.60%
screenshot-3.png90.09KB25.83KB▼ 71.33%