84% edd-and-wp-affiliate-integration

Code Review | Easy Digital Downloads and Affiliate Program Integration

WordPress plugin Easy Digital Downloads and Affiliate Program Integration scored84%from 54 tests.

About plugin

  • Plugin page: edd-and-wp-affili...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.8
  • WordPress version: 6.3.1
  • First release: May 14, 2014
  • Latest release: Jul 13, 2021
  • Number of updates: 9
  • Update frequency: every 292.4 days
  • Top authors: mra13 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,636 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

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

An overview of server-side resources used by Easy Digital Downloads and Affiliate Program Integration
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.31 ▼2.20
Dashboard /wp-admin3.31 ▲0.0150.64 ▲5.22
Posts /wp-admin/edit.php3.36 ▲0.0147.24 ▼0.86
Add New Post /wp-admin/post-new.php5.89 ▲0.0185.67 ▼26.14
Media Library /wp-admin/upload.php3.24 ▲0.0135.79 ▲2.53

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Easy Digital Downloads and Affiliate Program Integration
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲5413.52 ▼1.135.31 ▲3.5938.53 ▼1.90
Dashboard /wp-admin2,203 ▲185.83 ▲0.77100.98 ▼11.1841.69 ▼0.27
Posts /wp-admin/edit.php2,086 ▼31.99 ▼0.0735.60 ▲0.4533.23 ▼0.90
Add New Post /wp-admin/post-new.php1,533 ▲523.54 ▲0.49674.56 ▼8.3950.34 ▼10.40
Media Library /wp-admin/upload.php1,388 ▼04.21 ▲0.06112.11 ▲21.1652.77 ▲11.05

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
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts

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)
Even though everything seems fine, this is not an exhaustive test

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
  • 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-and-wp-affiliate-integration/wp-aff-edd-integration.php:52

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
10 plugin tags: integration, affiliate, wp affiliate, digital downloads, edd...

edd-and-wp-affiliate-integration/wp-aff-edd-integration.php 92% from 13 tests

The primary PHP file in "Easy Digital Downloads and Affiliate Program Integration" version 1.1 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("edd-and-wp-affiliate-integration.php" instead of "wp-aff-edd-integration.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin32 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP181232

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
PNG images were not found in this plugin