10% easy-digital-download-affiliate-banners

Code Review | Easy Digital Downloads Affiliate Banners

WordPress plugin Easy Digital Downloads Affiliate Banners scored10%from 54 tests.

About plugin

  • Plugin page: easy-digital-down...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Oct 9, 2012
  • Latest release: Oct 11, 2012
  • Number of updates: 11
  • Update frequency: N/A
  • Top authors: corsonr (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,428 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
It is recommended to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/easy-digital-download-affiliate-banners/includes/widgets.php+7
    Methods with the same name as their class will not be constructors in a future version of PHP; eddab_affiliate_banners has a deprecated constructor

Server metrics [RAM: ▼1.92MB] [CPU: ▼61.79ms] Passed 4 tests

Server-side resources used by Easy Digital Downloads Affiliate Banners
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.08 ▼1.394.88 ▼41.52
Dashboard /wp-admin2.10 ▼1.256.75 ▼57.88
Posts /wp-admin/edit.php2.10 ▼1.267.02 ▼43.14
Add New Post /wp-admin/post-new.php2.10 ▼3.796.83 ▼104.62
Media Library /wp-admin/upload.php2.10 ▼1.135.99 ▼34.04

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 17 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
widget_eddab_affiliate_banners
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Easy Digital Downloads Affiliate Banners
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.26 ▼1.334.44 ▲2.4940.10 ▼2.41
Dashboard /wp-admin2,206 ▲214.87 ▼1.01103.87 ▼0.6138.73 ▼3.59
Posts /wp-admin/edit.php2,089 ▼01.99 ▼0.0241.28 ▲3.7034.65 ▼1.59
Add New Post /wp-admin/post-new.php1,542 ▲2323.08 ▼0.16677.97 ▲2.9650.61 ▼6.21
Media Library /wp-admin/upload.php1,388 ▼04.21 ▼0.0393.78 ▼16.0841.82 ▼4.35

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/easy-digital-download-affiliate-banners/includes/widgets.php+7
    Methods with the same name as their class will not be constructors in a future version of PHP; eddab_affiliate_banners has a deprecated constructor
  • This plugin does not fully uninstall, leaving 7 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_eddab_affiliate_banners
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

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 no errors were found, this is by no means 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 take a closer look at the following
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/easy-digital-download-affiliate-banners/includes/widgets.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/easy-digital-download-affiliate-banners/edd-affiliate-banners.php:20

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Tags: There are too many tags (16 tag instead of maximum 10)
The official readme.txt is a good inspiration

easy-digital-download-affiliate-banners/edd-affiliate-banners.php 92% from 13 tests

The main PHP script in "Easy Digital Downloads Affiliate Banners" version 1.0 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("easy-digital-download-affiliate-banners.php" instead of "edd-affiliate-banners.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin85 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP3314185

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity2.25
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin