83% gifting-addon-for-easy-digital-downloads

Code Review | EDD-Gifting Addon

WordPress plugin EDD-Gifting Addon scored 83% from 54 tests.

About plugin

  • Plugin page: gifting-addon-for...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9.2-4.4.1
  • WordPress version: 6.3.1
  • First release: Jan 15, 2016
  • Latest release: Jan 18, 2016
  • Number of updates: 3
  • Update frequency: every 1.3 days
  • Top authors: wpproking (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 660 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼4.75ms] Passed 4 tests

A check of server-side resources used by EDD-Gifting Addon
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0044.47 ▲5.22
Dashboard /wp-admin3.31 ▲0.0044.68 ▼0.97
Posts /wp-admin/edit.php3.36 ▲0.0045.18 ▼3.01
Add New Post /wp-admin/post-new.php5.89 ▲0.0090.94 ▼15.46
Media Library /wp-admin/upload.php3.23 ▲0.0034.12 ▲0.44

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

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

Browser metrics Passed 4 tests

A check of browser resources used by EDD-Gifting Addon
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.15 ▼1.241.52 ▼0.2137.52 ▼3.75
Dashboard /wp-admin2,203 ▲155.86 ▼0.02105.14 ▲1.3844.23 ▲2.91
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0238.72 ▼3.0335.12 ▼0.69
Add New Post /wp-admin/post-new.php1,529 ▼518.11 ▼5.14592.06 ▼32.9153.72 ▲3.86
Media Library /wp-admin/upload.php1,385 ▼34.16 ▼0.0596.55 ▼5.5941.48 ▼4.85

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
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/gifting-addon-for-easy-digital-downloads/functions/hooks-actions.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Tags: Please reduce the number of tags, currently 16 tag instead of maximum 10
The official readme.txt might help

gifting-addon-for-easy-digital-downloads/edd-gifting-addon.php 85% from 13 tests

"EDD-Gifting Addon" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Text Domain: Please use dashes and lowercase characters for text domains
  • Main file name: The principal plugin file should be the same as the plugin slug ("gifting-addon-for-easy-digital-downloads.php" instead of "edd-gifting-addon.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin111 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP33621102
JavaScript1209

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.09
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.17
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
No PNG images were found in this plugin