74% emailpress

Code Review | EmailPress

WordPress plugin EmailPress scored74%from 54 tests.

About plugin

  • Plugin page: emailpress
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-4.7
  • WordPress version: 6.3.1
  • First release: May 6, 2017
  • Latest release: May 6, 2017
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: kvvaradha (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /753 total downloads

Benchmarks

Plugin footprint 65% 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.11MB] [CPU: ▲2.44ms] Passed 4 tests

This is a short check of server-side resources used by EmailPress
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0746.92 ▲5.58
Dashboard /wp-admin3.50 ▲0.1978.17 ▲28.62
Posts /wp-admin/edit.php3.54 ▲0.1856.66 ▲5.03
Add New Post /wp-admin/post-new.php5.98 ▲0.0991.49 ▼7.07
Media Library /wp-admin/upload.php3.33 ▲0.1045.08 ▲6.23
Settings /wp-admin/admin.php?page=KvSubscriptions3.3253.16
Subscribers /wp-admin/admin.php?page=Subscribers3.3348.80
EmailPress /wp-admin/admin.php?page=emailpress3.3343.71

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 16 new files
Database: 2 new tables, 10 new options
New tables
wp_Kv_Subscribers
wp_Kv_Mail_Queue
New WordPress options
db_upgraded
widget_theysaidso_widget
kvcodes_SubscriptionText
widget_recent-comments
widget_emailpress_widget
can_compress_scripts
kvcodes_Subscription
kvcodes_Subscription_Email
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for EmailPress
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,106 ▲34515.15 ▲0.595.40 ▲3.6240.28 ▼7.43
Dashboard /wp-admin2,360 ▲1836.35 ▲0.69119.78 ▲29.0495.59 ▲53.95
Posts /wp-admin/edit.php2,306 ▲2033.51 ▲1.4849.14 ▲7.0759.36 ▲20.91
Add New Post /wp-admin/post-new.php1,719 ▲19322.19 ▼0.92610.99 ▼91.9835.78 ▼16.03
Media Library /wp-admin/upload.php1,437 ▲404.26 ▲0.0284.89 ▼23.9583.93 ▲38.37
Settings /wp-admin/admin.php?page=KvSubscriptions1,5353.5468.3366.00
Subscribers /wp-admin/admin.php?page=Subscribers1,1933.2149.0668.09
EmailPress /wp-admin/admin.php?page=emailpress1,1613.2143.2969.37

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 2 tables in the database
    • wp_Kv_Mail_Queue
    • wp_Kv_Subscribers
  • Zombie WordPress options were found after uninstall: 10 options
    • widget_emailpress_widget
    • widget_theysaidso_widget
    • kvcodes_Subscription
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • kvcodes_Subscription_Email
    • widget_recent-comments
    • kvcodes_SubscriptionText

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 6× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/emailpress/Newsletter.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/emailpress/Email.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/emailpress/Kv-SubcriptionFront.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/emailpress/Kv-SubcriptionFront.php:8
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/emailpress/Newsletter.php on line 3
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/emailpress/Newsletter.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Screenshots: Screenshot #1 (Plugin Settings Page to Customize it.) image missing
You can take inspiration from this readme.txt

emailpress/EmailPress.php 92% from 13 tests

Analyzing the main PHP file in "EmailPress" version 1.0
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("emailpress.php" instead of "EmailPress.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 detected1,817 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP62513111,486
CSS130290
JavaScript12341

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity20.40
▷ Minimum class complexity5.00
▷ Maximum class complexity69.00
Average method complexity2.67
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods59
▷ Static methods00.00%
▷ Public methods59100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions22
▷ Named functions2195.45%
▷ Anonymous functions14.55%
Constants0
▷ Global constants00.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
7 PNG files occupy 0.13MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/emailpress.png12.06KB4.02KB▼ 66.69%
images/subscription-icon.png11.67KB5.08KB▼ 56.48%
images/kv_logo.png1.19KB0.56KB▼ 53.03%
screenshot-1.png98.69KB44.12KB▼ 55.29%
images/close_blue.png6.71KB7.58KB0.00%