78% wpdm-premium-packages

Code Review | Premium Packages - Sell Digital Products Securely

WordPress plugin Premium Packages - Sell Digital Products Securely scored78%from 54 tests.

About plugin

  • Plugin page: wpdm-premium-pack...
  • Plugin version: 5.8.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.4
  • WordPress version: 6.3.1
  • First release: May 14, 2018
  • Latest release: Nov 25, 2023
  • Number of updates: 281
  • Update frequency: every 7.2 days
  • Top authors: codename065 (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

4,000+ active /300,080 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.33MB] [CPU: ▼4.97ms] Passed 4 tests

Analyzing server-side resources used by Premium Packages - Sell Digital Products Securely
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.81 ▲0.3439.28 ▲0.19
Dashboard /wp-admin3.65 ▲0.3044.62 ▼15.52
Posts /wp-admin/edit.php3.76 ▲0.4146.47 ▼2.01
Add New Post /wp-admin/post-new.php6.23 ▲0.3492.86 ▼2.52
Media Library /wp-admin/upload.php3.57 ▲0.3433.56 ▲1.13

Server storage [IO: ▲2.18MB] [DB: ▲0.31MB] Passed 3 tests

Filesystem and database footprint
This plugin installed successfully
Filesystem: 344 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Premium Packages - Sell Digital Products Securely
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2814.04 ▼0.671.68 ▼0.3735.54 ▼7.78
Dashboard /wp-admin2,205 ▲255.61 ▼0.0290.99 ▲1.7243.77 ▲2.61
Posts /wp-admin/edit.php2,110 ▲131.96 ▼0.0540.13 ▲0.9738.07 ▲2.60
Add New Post /wp-admin/post-new.php1,536 ▼1223.15 ▼0.05664.58 ▲35.8151.96 ▼4.89
Media Library /wp-admin/upload.php1,404 ▲44.19 ▼0.0196.50 ▼1.9642.00 ▲1.24

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 50% 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 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 10× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/wpdm-premium-packages/includes/menus/templates/orders/acr-attempts.php
    • > /wp-content/plugins/wpdm-premium-packages/includes/menus/templates/orders/list-orders.php
    • > /wp-content/plugins/wpdm-premium-packages/templates/dashboard-widgets/recent-sales.php
    • > /wp-content/plugins/wpdm-premium-packages/templates/dashboard-widgets/sales-overview.php
    • > /wp-content/plugins/wpdm-premium-packages/includes/menus/templates/customer-profile.php
    • > /wp-content/plugins/wpdm-premium-packages/templates/dashboard-widgets/latest-orders.php
    • > /wp-content/plugins/wpdm-premium-packages/templates/checkout-cart/checkout.php
    • > /wp-content/plugins/wpdm-premium-packages/templates/dashboard/withdraws.php
    • > /wp-content/plugins/wpdm-premium-packages/includes/menus/templates/customer-purchases.php
    • > /wp-content/plugins/wpdm-premium-packages/templates/dashboard-widgets/top-sales.php
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function WPDMPP\\Libs\\add_action() in wp-content/plugins/wpdm-premium-packages/includes/libs/CronJobs.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function WPDMPP\\Libs\\add_filter() in wp-content/plugins/wpdm-premium-packages/includes/libs/SellerDashboard.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function WPDMPP\\add_action() in wp-content/plugins/wpdm-premium-packages/includes/libs/OrderNoteTemplates.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function WPDMPP\\Libs\\add_action() in wp-content/plugins/wpdm-premium-packages/includes/libs/AbandonedOrderRecovery.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Donate link: Invalid url: ""
The official readme.txt is a good inspiration

wpdm-premium-packages/wpdm-premium-packages.php Passed 13 tests

Analyzing the main PHP file in "Premium Packages - Sell Digital Products Securely" version 5.8.1
66 characters long description:
Complete solution for selling digital products securely and easily

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
There were no executable files found in this plugin43,928 lines of code in 322 files:
LanguageFilesBlank linesComment linesLines of code
PHP993,0841,46717,805
JSON2000017,638
JavaScript57955124,238
PO File21,3222,2032,736
CSS1169141,164
SVG501347

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity37.41
▷ Minimum class complexity1.00
▷ Maximum class complexity214.00
Average method complexity4.36
▷ Minimum method complexity1.00
▷ Maximum method complexity46.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes32
▷ Abstract classes00.00%
▷ Concrete classes32100.00%
▷ Final classes00.00%
Methods347
▷ Static methods4111.82%
▷ Public methods34499.14%
▷ Protected methods00.00%
▷ Private methods30.86%
Functions107
▷ Named functions10598.13%
▷ Anonymous functions21.87%
Constants9
▷ Global constants888.89%
▷ Class constants111.11%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
10 PNG files occupy 0.06MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/statistic-box-green.png1.21KB1.21KB0.00%
assets/images/download-manager-logo-v4.png17.49KB8.66KB▼ 50.49%
assets/images/statistic-box-grid.png0.11KB0.11KB▼ 0.92%
templates/invoices/default/assets/corners.png12.10KB4.75KB▼ 60.75%
assets/images/paypal.png2.51KB2.07KB▼ 17.75%