94% acymailing-integration-for-easy-digital-downloads

Code Review | Easy Digital Downloads integration - AcyMailing

WordPress plugin Easy Digital Downloads integration - AcyMailing scored 94% from 54 tests.

About plugin

  • Plugin page: acymailing-integr...
  • Plugin version: 1.2
  • PHP compatiblity: 5.6.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.9.2
  • WordPress version: 5.9.2
  • First release: Jan 27, 2022
  • Latest release: Mar 21, 2022
  • Number of updates: 4
  • Update frequency: every 13.5 days
  • Top authors: acyba (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 189 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

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

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

Analyzing server-side resources used by Easy Digital Downloads integration - AcyMailing
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.4155.61 ▲30.46
Dashboard /wp-admin3.42 ▲0.0135.06 ▲2.30
Posts /wp-admin/edit.php3.66 ▲0.0139.89 ▲2.44
Add New Post /wp-admin/post-new.php6.89 ▼0.0895.57 ▼1,168.26
Media Library /wp-admin/upload.php3.31 ▲0.0123.45 ▲0.06

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Easy Digital Downloads integration - AcyMailing
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,749 ▲515.63 ▲0.085.71 ▼0.632.32 ▼0.02
Dashboard /wp-admin2,881 ▲206.07 ▼0.09125.70 ▼9.58158.80 ▼4.39
Posts /wp-admin/edit.php2,694 ▼03.24 ▼0.0161.54 ▼3.23136.69 ▼8.63
Add New Post /wp-admin/post-new.php1,661 ▼715.94 ▼2.73462.11 ▲29.15156.61 ▲0.12
Media Library /wp-admin/upload.php1,695 ▼35.51 ▲0.03144.28 ▲1.78187.01 ▼1.09

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
This plugin's uninstaller ran successfully

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 fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'AcyMailing\\Libraries\\acymPlugin' not found in wp-content/plugins/acymailing-integration-for-easy-digital-downloads/plugin.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_deactivation_hook() in wp-content/plugins/acymailing-integration-for-easy-digital-downloads/acymailing-easydigitaldownloads.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test


Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: e-commerce, newsletter, acymailing, digital store, integration

acymailing-integration-for-easy-digital-downloads/acymailing-easydigitaldownloads.php 92% from 13 tests

"Easy Digital Downloads integration - AcyMailing" version 1.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("acymailing-integration-for-easy-digital-downloads.php" instead of "acymailing-easydigitaldownloads.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 plugin828 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity123.00
▷ Minimum class complexity123.00
▷ Maximum class complexity123.00
Average method complexity7.78
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods1266.67%
▷ Protected methods00.00%
▷ Private methods633.33%
▷ Named functions3100.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.07MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
banner.png61.48KB25.59KB▼ 58.38%