83% easy-digital-downloads-lock-downloads-to-ip

Code Review | Easy Digital Downloads - Lock Downloads to IP

WordPress plugin Easy Digital Downloads - Lock Downloads to IP scored83%from 54 tests.

About plugin

  • Plugin page: easy-digital-down...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-5.7
  • WordPress version: 6.3.1
  • First release: Apr 12, 2013
  • Latest release: Mar 18, 2021
  • Number of updates: 8
  • Update frequency: every 362.1 days
  • Top authors: mordauk (75%)NoseGraze (37.5%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /4,737 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

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

This is a short check of server-side resources used by Easy Digital Downloads - Lock Downloads to IP
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.86 ▼2.84
Dashboard /wp-admin3.32 ▲0.0147.95 ▼1.10
Posts /wp-admin/edit.php3.37 ▲0.0151.27 ▲1.60
Add New Post /wp-admin/post-new.php5.90 ▲0.0181.38 ▼16.86
Media Library /wp-admin/upload.php3.24 ▲0.0137.50 ▲4.46

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Easy Digital Downloads - Lock Downloads to IP: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.36 ▼1.031.91 ▼0.2042.60 ▼1.72
Dashboard /wp-admin2,200 ▲185.83 ▼0.03142.07 ▲38.3148.44 ▲10.21
Posts /wp-admin/edit.php2,089 ▼31.96 ▼0.0936.20 ▼0.4231.66 ▼1.29
Add New Post /wp-admin/post-new.php1,532 ▼423.14 ▼0.35647.34 ▼7.1456.09 ▼12.04
Media Library /wp-admin/upload.php1,382 ▼64.36 ▲0.1694.65 ▲1.8443.02 ▲0.72

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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
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 take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/easy-digital-downloads-lock-downloads-to-ip/edd-lock-downloads-to-ip.php:18

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 86% from 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: edd, easy digital downloads, downloads, file download, ip address

easy-digital-downloads-lock-downloads-to-ip/edd-lock-downloads-to-ip.php 69% from 13 tests

This is the main PHP file of "Easy Digital Downloads - Lock Downloads to IP" version 1.0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("easy-digital-downloads-lock-downloads-to-ip.php" instead of "edd-lock-downloads-to-ip.php")
  • Domain Path: The domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("languages")
  • Domain Path: The domain path should be prefixed with a forward slash character ("/languages")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin80 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP2193839
PO File15838
Markdown1203

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There are no PNG files in this plugin