83% edd-terms-per-product

Code Review | Easy Digital Downloads - Terms Per Product

WordPress plugin Easy Digital Downloads - Terms Per Product scored83%from 54 tests.

About plugin

  • Plugin page: edd-terms-per-pro...
  • Plugin version: 1.0.7
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-5.7
  • WordPress version: 6.3.1
  • First release: Jul 12, 2013
  • Latest release: Mar 29, 2021
  • Number of updates: 12
  • Update frequency: every 234.8 days
  • Top authors: mordauk (83.33%)NoseGraze (16.67%)sdavis2702 (16.67%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /6,421 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

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

Server-side resources used by Easy Digital Downloads - Terms Per Product
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.61 ▲2.93
Dashboard /wp-admin3.32 ▲0.0157.82 ▲7.91
Posts /wp-admin/edit.php3.37 ▲0.0149.85 ▲1.43
Add New Post /wp-admin/post-new.php5.90 ▲0.0191.92 ▼9.03
Media Library /wp-admin/upload.php3.24 ▲0.0137.10 ▲1.96

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Easy Digital Downloads - Terms Per Product
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4314.48 ▼0.111.78 ▼0.1644.59 ▼0.48
Dashboard /wp-admin2,209 ▲215.91 ▲1.0499.64 ▼7.9839.35 ▼1.29
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0437.71 ▼6.4036.62 ▲2.34
Add New Post /wp-admin/post-new.php1,539 ▲2523.08 ▲5.55685.89 ▲43.6457.53 ▲4.26
Media Library /wp-admin/upload.php1,391 ▲34.23 ▲0.08103.82 ▼4.8445.50 ▼0.90

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • 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
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/edd-terms-per-product/edd-terms-per-product.php:20

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 87% from 29 tests

readme.txt 88% 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 (16 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Screenshots: Please add images for these screenshots: #1 (Download product terms), #2 (Checkout screen with terms of use per-product)
You can take inspiration from this readme.txt

edd-terms-per-product/edd-terms-per-product.php 85% from 13 tests

"Easy Digital Downloads - Terms Per Product" version 1.0.7's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Domain Path: Please prefix the domain path with a forward slash character ("/languages")
  • Domain Path: The domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected107 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP12357107

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity2.12
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.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
2 PNG files occupy 0.12MB with 0.08MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png61.20KB19.17KB▼ 68.68%
screenshot-2.png60.04KB18.43KB▼ 69.30%