78% email-marketing

Code Review | Drip for WordPress

WordPress plugin Drip for WordPress scored78%from 54 tests.

About plugin

  • Plugin page: email-marketing
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.0.3
  • WordPress version: 6.3.1
  • First release: Nov 6, 2013
  • Latest release: Dec 22, 2022
  • Number of updates: 121
  • Update frequency: every 27.6 days
  • Top authors: iangaroian (76.03%)getdrip (24.79%)

Code review

54 tests

User reviews

4 reviews

Install metrics

4,000+ active /50,141 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.04MB] [CPU: ▼1.76ms] Passed 4 tests

Analyzing server-side resources used by Drip for WordPress
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0434.05 ▼2.33
Dashboard /wp-admin3.35 ▲0.0568.83 ▲22.06
Posts /wp-admin/edit.php3.46 ▲0.1146.99 ▼4.43
Add New Post /wp-admin/post-new.php5.93 ▲0.0592.06 ▼2.30
Media Library /wp-admin/upload.php3.27 ▲0.0534.06 ▲2.03
Drip /wp-admin/options-general.php?page=drip3.2430.46

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 10 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
drip_options
can_compress_scripts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Drip for WordPress
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,832 ▲8613.78 ▼0.614.65 ▲2.9643.94 ▼4.09
Dashboard /wp-admin2,212 ▲244.80 ▼0.12101.99 ▼16.8738.83 ▼6.68
Posts /wp-admin/edit.php2,098 ▲92.04 ▼0.0634.36 ▼9.7134.86 ▼1.01
Add New Post /wp-admin/post-new.php1,519 ▼1717.63 ▼5.53646.76 ▼22.4654.99 ▼5.75
Media Library /wp-admin/upload.php1,388 ▲64.26 ▼0.0499.34 ▼2.9844.32 ▲2.19
Drip /wp-admin/options-general.php?page=drip8282.1925.3836.40

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
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 0% 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× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/email-marketing/views/tracking-code.php
  • 7× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Notice
      Undefined variable: account_id in wp-content/plugins/email-marketing/views/tracking-code.php on line 5
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/email-marketing/lib/constants.php on line 18
    • > PHP Notice
      Undefined variable: account_id in wp-content/plugins/email-marketing/views/tracking-code.php on line 10
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/email-marketing/views/options.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/email-marketing/lib/constants.php:18
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/email-marketing/lib/constants.php on line 18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/email-marketing/lib/constants.php:18

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 93% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
5 plugin tags: email marketing, email newsletters, autoresponders, email campaign, marketing automation

email-marketing/drip.php 85% from 13 tests

This is the main PHP file of "Drip for WordPress" version 1.0.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Description: Please don't use more than 140 characters for the plugin description (currently 146 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("email-marketing.php" instead of "drip.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
Good job! No executable or dangerous file extensions detected302 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP548176168
CSS1193134

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.33
Average class complexity17.00
▷ Minimum class complexity17.00
▷ Maximum class complexity17.00
Average method complexity1.84
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods19
▷ Static methods15.26%
▷ Public methods1894.74%
▷ Protected methods00.00%
▷ Private methods15.26%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
3 PNG files occupy 0.15MB with 0.10MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png43.07KB12.65KB▼ 70.63%
images/drip-icon-64.png2.21KB1.07KB▼ 51.52%
screenshot-2.png112.42KB33.63KB▼ 70.08%