74% lana-downloads-manager

Code Review | Lana Downloads Manager

WordPress plugin Lana Downloads Manager scored74%from 54 tests.

About plugin

  • Plugin page: lana-downloads-ma...
  • Plugin version: 1.8.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.4
  • WordPress version: 6.3.1
  • First release: Oct 11, 2016
  • Latest release: Dec 2, 2023
  • Number of updates: 118
  • Update frequency: every 22.1 days
  • Top authors: lanacodes (53.39%)lanadesign (47.46%)

Code review

54 tests

User reviews

15 reviews

Install metrics

3,000+ active /52,005 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.40MB] [CPU: ▲4.85ms] Passed 4 tests

This is a short check of server-side resources used by Lana Downloads Manager
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.85 ▲0.3858.33 ▲13.62
Dashboard /wp-admin3.77 ▲0.4357.95 ▼3.60
Posts /wp-admin/edit.php3.82 ▲0.4663.96 ▲17.82
Add New Post /wp-admin/post-new.php6.30 ▲0.4196.95 ▼1.17
Media Library /wp-admin/upload.php3.61 ▲0.3845.23 ▲10.56
Settings /wp-admin/edit.php?post_type=lana_download&page=lana-downloads-manager-settings3.6148.02
Add New /wp-admin/post-new.php?post_type=lana_download3.8258.86
All Downloads /wp-admin/edit.php?post_type=lana_download3.7660.11
Categories /wp-admin/edit-tags.php?taxonomy=lana_download_category&post_type=lana_download3.7648.40

Server storage [IO: ▲0.17MB] [DB: ▲0.01MB] Passed 3 tests

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 15 new files
Database: 1 new table, 8 new options
New tables
wp_lana_downloads_manager_logs
New WordPress options
widget_recent-posts
lana_downloads_manager_post_type
db_upgraded
widget_lana_download
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Lana Downloads Manager
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,975 ▲22814.60 ▲0.202.22 ▲0.1744.14 ▲0.48
Dashboard /wp-admin2,378 ▲2016.16 ▲0.54114.65 ▲12.7239.48 ▼4.51
Posts /wp-admin/edit.php2,303 ▲2033.38 ▲1.3755.12 ▲15.0234.81 ▼0.91
Add New Post /wp-admin/post-new.php1,565 ▲3023.36 ▲5.13581.27 ▼74.0832.43 ▼36.90
Media Library /wp-admin/upload.php1,443 ▲434.10 ▼0.1278.29 ▼18.1041.17 ▼1.14
Settings /wp-admin/edit.php?post_type=lana_download&page=lana-downloads-manager-settings1,3583.0341.9056.72
Add New /wp-admin/post-new.php?post_type=lana_download2,4507.58191.0173.07
All Downloads /wp-admin/edit.php?post_type=lana_download1,3513.2946.9732.06
Categories /wp-admin/edit-tags.php?taxonomy=lana_download_category&post_type=lana_download1,4773.1540.8031.66

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_lana_downloads_manager_logs
  • Zombie WordPress options were found after uninstall: 8 options
    • lana_downloads_manager_post_type
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_lana_download
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/lana-downloads-manager/includes/class-lana-download-widget.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'WP_List_Table' not found in wp-content/plugins/lana-downloads-manager/includes/class-lana-downloads-manager-logs-list-table.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: file manager, download, download counter, download manager

lana-downloads-manager/lana-downloads-manager.php Passed 13 tests

The principal PHP file in "Lana Downloads Manager" v. 1.8.2 is loaded by WordPress automatically on each request
39 characters long description:
Downloads Manager with counter and log.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin3,136 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP75296951,755
JSON1001,205
JavaScript2284118
CSS212058

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity23.00
▷ Minimum class complexity12.00
▷ Maximum class complexity32.00
Average method complexity3.54
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods26
▷ Static methods00.00%
▷ Public methods26100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions63
▷ Named functions6196.83%
▷ Anonymous functions23.17%
Constants4
▷ Global constants4100.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
1 compressed PNG file occupies 0.03MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/img/plugin-header.png28.91KB29.86KB0.00%