84% download-button-for-elementor

Code Review | Download Button for Elementor

WordPress plugin Download Button for Elementor scored84%from 54 tests.

About plugin

  • Plugin page: download-button-f...
  • Plugin version: 1.1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.0
  • WordPress version: 6.3.1
  • First release: Sep 25, 2019
  • Latest release: Jun 22, 2022
  • Number of updates: 5
  • Update frequency: every 200.2 days
  • Top authors: clicklabsde (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

2,000+ active /15,684 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼5.44ms] Passed 4 tests

Analyzing server-side resources used by Download Button for Elementor
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0236.24 ▼0.28
Dashboard /wp-admin3.33 ▲0.0345.82 ▼0.77
Posts /wp-admin/edit.php3.38 ▲0.0243.10 ▼9.31
Add New Post /wp-admin/post-new.php5.91 ▲0.0287.00 ▼11.40
Media Library /wp-admin/upload.php3.25 ▲0.0232.85 ▲0.21

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Download Button for Elementor
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲4713.22 ▼1.091.81 ▼0.1441.02 ▼0.72
Dashboard /wp-admin2,224 ▲365.80 ▲0.9496.87 ▼7.4036.71 ▼7.28
Posts /wp-admin/edit.php2,106 ▲142.00 ▲0.0435.03 ▼5.9533.79 ▼4.20
Add New Post /wp-admin/post-new.php1,532 ▼1123.37 ▲4.98664.62 ▲31.8254.29 ▲5.65
Media Library /wp-admin/upload.php1,409 ▲304.24 ▲0.0297.57 ▼3.3143.23 ▼0.38

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Widget_Base' not found in wp-content/plugins/download-button-for-elementor/widgets/download-button-widget.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Control_Base_Multiple' not found in wp-content/plugins/download-button-for-elementor/controls/file-control.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration Passed 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: elementor button, elementor download button widget, elementor addons, elementor, elementor download button

download-button-for-elementor/download-button-for-elementor.php Passed 13 tests

The primary PHP file in "Download Button for Elementor" version 1.1.0 is used by WordPress to initiate all plugin functionality
82 characters long description:
A simple download button with the ability to choose a file from the media library.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin642 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP3123296556
JavaScript114886

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity7.67
▷ Minimum class complexity3.00
▷ Maximum class complexity12.00
Average method complexity1.83
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes133.33%
Methods24
▷ Static methods28.33%
▷ Public methods1979.17%
▷ Protected methods520.83%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin