77% wp-emfluence

Code Review | emfluence Marketing Platform

WordPress plugin emfluence Marketing Platform scored77%from 54 tests.

About plugin

  • Plugin page: wp-emfluence
  • Plugin version: 2.13
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.0
  • WordPress version: 6.3.1
  • First release: May 20, 2016
  • Latest release: Jun 13, 2022
  • Number of updates: 26
  • Update frequency: every 85.2 days
  • Top authors: emfluencekc (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

40+ active /1,891 total downloads

Benchmarks

Plugin footprint 83% from 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.31MB] [CPU: ▼3.41ms] Passed 4 tests

A check of server-side resources used by emfluence Marketing Platform
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.80 ▲0.3038.35 ▼3.06
Dashboard /wp-admin3.67 ▲0.2857.37 ▼7.24
Posts /wp-admin/edit.php3.78 ▲0.3854.39 ▲3.90
Add New Post /wp-admin/post-new.php6.25 ▲0.3294.51 ▼6.18
Media Library /wp-admin/upload.php3.59 ▲0.3241.77 ▲2.86
emfluence Marketing Platform /wp-admin/options-general.php?page=emfluence_emailer3.5637.17

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for emfluence Marketing Platform
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲4714.24 ▼0.001.67 ▲0.0345.03 ▲3.29
Dashboard /wp-admin2,196 ▲225.58 ▼0.0282.44 ▼7.6241.88 ▲1.42
Posts /wp-admin/edit.php2,083 ▼141.96 ▲0.0233.76 ▼1.5638.99 ▲1.86
Add New Post /wp-admin/post-new.php1,536 ▲1023.31 ▼0.25677.51 ▼18.6450.89 ▼6.68
Media Library /wp-admin/upload.php1,404 ▲14.25 ▲0.0495.37 ▼7.0144.08 ▼2.97
emfluence Marketing Platform /wp-admin/options-general.php?page=emfluence_emailer8832.0022.0029.43

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • can_compress_scripts
    • widget_emfluence_email_signup
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

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

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 3× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/wp-emfluence/libraries/emfl_platform_api/example.php
    • > /wp-content/plugins/wp-emfluence/libraries/emfl_platform_api/tests.php
    • > /wp-content/plugins/wp-emfluence/theme/success.php
  • 7× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-emfluence/inc/woocommerce.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-emfluence/inc/store_locator.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-emfluence/inc/recaptcha.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-emfluence/inc/discount_code.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/wp-emfluence/admin.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-emfluence/emfluence.php:36
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-emfluence/widget.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 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
These attributes need to be fixed:
  • Tags: Please delete some tags, you are using 13 tag instead of maximum 10
  • Screenshots: These screenshots do not have images: #1 (Widget edit screen. Enter your widget title and description, customize your Submit Button text,), #2 (Widget edit screen. Choose what groups your new contacts should be added to. The group names), #3 (Widget edit screen. Choose from the standard set of fields (First Name, Last Name, City, State,)
The official readme.txt might help

wp-emfluence/emfluence.php 85% from 13 tests

This is the main PHP file of "emfluence Marketing Platform" version 2.13, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important 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 ("wp-emfluence.php" instead of "emfluence.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 plugin3,455 lines of code in 32 files:
LanguageFilesBlank linesComment linesLines of code
PHP112362761,733
Sass3210524
Pascal9113481495
JavaScript33317238
CSS222832234
HTML24511202
Markdown214029

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity48.83
▷ Minimum class complexity1.00
▷ Maximum class complexity178.00
Average method complexity4.91
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods60
▷ Static methods11.67%
▷ Public methods3761.67%
▷ Protected methods2338.33%
▷ Private methods00.00%
Functions21
▷ Named functions1885.71%
▷ Anonymous functions314.29%
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
9 PNG files occupy 0.10MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png18.28KB8.19KB▼ 55.17%
css/images/ui-icons_777777_256x240.png6.83KB4.17KB▼ 38.92%
screenshot-3.png24.18KB9.86KB▼ 59.24%
screenshot-1.png28.80KB12.38KB▼ 57.02%
css/images/ui-icons_cc0000_256x240.png4.44KB4.17KB▼ 6.02%