94% edd-mailerlite

Code Review | EDD Mailerlite

WordPress plugin EDD Mailerlite scored 94% from 54 tests.

About plugin

  • Plugin page: edd-mailerlite
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.7.4
  • WordPress version: 5.8.1
  • First release: May 9, 2017
  • Latest release: May 9, 2017
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: flowdee (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

70+ active / 1,142 total downloads

Benchmarks

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
This plugin's installer ran successfully

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

A check of server-side resources used by EDD Mailerlite
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.0145.12 ▲15.79
Dashboard /wp-admin3.07 ▲0.0249.06 ▲1.68
Posts /wp-admin/edit.php3.12 ▲0.0244.39 ▼2.35
Add New Post /wp-admin/post-new.php5.44 ▲0.0098.29 ▼566.24
Media Library /wp-admin/upload.php3.01 ▲0.0134.88 ▼2.89

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 208 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

EDD Mailerlite: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲10715.79 ▲0.219.83 ▲1.5549.39 ▼0.02
Dashboard /wp-admin2,989 ▲586.00 ▼0.14143.38 ▼31.24122.98 ▼11.24
Posts /wp-admin/edit.php2,739 ▼02.69 ▲0.0166.98 ▼8.5099.36 ▼1.31
Add New Post /wp-admin/post-new.php1,683 ▼018.74 ▼0.03395.14 ▼1.98114.71 ▼2.50
Media Library /wp-admin/upload.php1,807 ▼05.01 ▼0.01149.71 ▼15.71119.16 ▼11.06

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check 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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 101× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'MailerLiteApi\\Common\\ApiAbstract' not found in wp-content/plugins/edd-mailerlite/vendor/mailerlite/mailerlite-api-v2-php-sdk/src/Api/Fields.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\UploadedFileInterface' not found in wp-content/plugins/edd-mailerlite/vendor/guzzlehttp/psr7/src/UploadedFile.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'Http\\Message\\Formatter' not found in wp-content/plugins/edd-mailerlite/vendor/php-http/message/src/Formatter/SimpleFormatter.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'MailerLiteApi\\Tests\\MlTestCase' not found in wp-content/plugins/edd-mailerlite/vendor/mailerlite/mailerlite-api-v2-php-sdk/tests/StatsTest.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/edd-mailerlite/vendor/clue/stream-filter/tests/FunTest.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Http\\Message\\Encoding\\FilteredStream' not found in wp-content/plugins/edd-mailerlite/vendor/php-http/message/src/Encoding/DecompressStream.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Http\\Client\\Exception\\RequestException' not found in wp-content/plugins/edd-mailerlite/vendor/php-http/httplug/src/Exception/HttpException.php:15
    • > PHP Fatal error
      Uncaught Error: Interface 'Http\\Discovery\\Strategy\\DiscoveryStrategy' not found in wp-content/plugins/edd-mailerlite/vendor/php-http/discovery/src/Strategy/MockClientStrategy.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'Http\\Message\\Authentication' not found in wp-content/plugins/edd-mailerlite/vendor/php-http/message/src/Authentication/QueryParam.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Http\\Client\\Exception\\RequestException' not found in wp-content/plugins/edd-mailerlite/vendor/php-http/httplug/src/Exception/NetworkException.php:12

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)
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Donate link: Invalid url: ""
The official readme.txt might help

edd-mailerlite/edd-mailerlite.php Passed 13 tests

Analyzing the main PHP file in "EDD Mailerlite" version 1.0.0
49 characters long description:
Mailerlite integration for Easy Digital Downloads

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
No dangerous file extensions were detected10,571 lines of code in 192 files:
LanguageFilesBlank linesComment linesLines of code
PHP1542,1455,2057,858
JSON15001,355
Markdown1989301,313
XML21331
YAML20014

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity5.86
▷ Minimum class complexity1.00
▷ Maximum class complexity64.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces29
Interfaces21
Traits6
Classes112
▷ Abstract classes32.68%
▷ Concrete classes10997.32%
▷ Final classes3935.78%
Methods758
▷ Static methods577.52%
▷ Public methods65486.28%
▷ Protected methods466.07%
▷ Private methods587.65%
Functions89
▷ Named functions4651.69%
▷ Anonymous functions4348.31%
Constants25
▷ Global constants728.00%
▷ Class constants1872.00%
▷ Public constants18100.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