84% download-monitor-learndash-integration

Code Review | Download Monitor & LearnDash integration

WordPress plugin Download Monitor & LearnDash integration scored84%from 54 tests.

About plugin

  • Plugin page: download-monitor-...
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.3
  • WordPress version: 6.3.1
  • First release: Sep 19, 2022
  • Latest release: Aug 9, 2023
  • Number of updates: 7
  • Update frequency: every 48.1 days
  • Top authors: raldea89 (85.71%)giucu91 (28.57%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /493 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼3.71ms] Passed 4 tests

This is a short check of server-side resources used by Download Monitor & LearnDash integration
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.66 ▼3.51
Dashboard /wp-admin3.32 ▲0.0144.93 ▼3.73
Posts /wp-admin/edit.php3.37 ▲0.0148.37 ▼0.84
Add New Post /wp-admin/post-new.php5.90 ▲0.0184.81 ▼6.75
Media Library /wp-admin/upload.php3.24 ▲0.0135.99 ▲3.41

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
widget_recent-comments
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Download Monitor & LearnDash integration
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9014.48 ▲0.101.87 ▼0.2041.35 ▼9.34
Dashboard /wp-admin2,206 ▲184.86 ▼0.16113.66 ▲0.1838.96 ▼7.74
Posts /wp-admin/edit.php2,089 ▼02.03 ▲0.0340.68 ▲5.9035.52 ▲0.46
Add New Post /wp-admin/post-new.php1,514 ▼017.46 ▼0.22633.99 ▼14.4552.18 ▼0.83
Media Library /wp-admin/upload.php1,391 ▲34.20 ▼0.0595.62 ▼11.4942.57 ▼3.03

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/download-monitor-learndash-integration/dlm-aam-learndash.php:37

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
Please take inspiration from this readme.txt

download-monitor-learndash-integration/dlm-aam-learndash.php 92% from 13 tests

The principal PHP file in "Download Monitor & LearnDash integration" v. 1.0.1 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("download-monitor-learndash-integration.php" instead of "dlm-aam-learndash.php")

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
No dangerous file extensions were detected162 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP258111158
Markdown1104

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity32.00
▷ Minimum class complexity32.00
▷ Maximum class complexity32.00
Average method complexity4.10
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods110.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants375.00%
▷ Class constants125.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected