74% letterpress

Code Review | LetterPress - Elevate Your WordPress Site's E-Mail Campaigns and Marketing

WordPress plugin LetterPress - Elevate Your WordPress Site's E-Mail Campaigns and Marketing scored74%from 54 tests.

About plugin

  • Plugin page: letterpress
  • Plugin version: 1.2.1
  • PHP compatiblity: 5.6.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-6.3
  • WordPress version: 6.3.1
  • First release: Sep 7, 2018
  • Latest release: Sep 29, 2023
  • Number of updates: 10
  • Update frequency: every 184.7 days
  • Top authors: themeqx (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /726 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.14MB] [CPU: ▼12.85ms] Passed 4 tests

Server-side resources used by LetterPress - Elevate Your WordPress Site's E-Mail Campaigns and Marketing
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1535.10 ▼11.79
Dashboard /wp-admin3.45 ▲0.1146.85 ▼15.37
Posts /wp-admin/edit.php3.57 ▲0.2143.63 ▼2.55
Add New Post /wp-admin/post-new.php6.04 ▲0.1582.30 ▼21.67
Media Library /wp-admin/upload.php3.38 ▲0.1537.42 ▲4.36
Campaigns /wp-admin/admin.php?page=letterpress-campaigns3.3633.36
Cron Job /wp-admin/admin.php?page=letterpress-cron3.3433.67
LetterPress /wp-admin/admin.php?page=letterpress3.3546.31
Subscribers /wp-admin/admin.php?page=letterpress-subscribers3.3832.77
Settings /wp-admin/admin.php?page=letterpress-settings3.3531.70

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 22 new files
Database: 2 new tables, 8 new options
New tables
wp_lp_subscribers
wp_lp_campaigns
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
lp_last_checked_time
widget_recent-comments
widget_recent-posts
LPRESS_VERSION

Browser metrics Passed 4 tests

This is an overview of browser requirements for LetterPress - Elevate Your WordPress Site's E-Mail Campaigns and Marketing
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,826 ▲4014.17 ▼0.181.45 ▼0.5037.98 ▼9.05
Dashboard /wp-admin2,229 ▲555.64 ▲0.0686.22 ▼10.5736.52 ▼2.34
Posts /wp-admin/edit.php2,137 ▲341.99 ▼0.0236.92 ▼7.2031.77 ▼4.19
Add New Post /wp-admin/post-new.php1,565 ▲3918.22 ▼4.98610.71 ▼3.0860.76 ▲16.62
Media Library /wp-admin/upload.php1,440 ▲464.12 ▲0.0198.66 ▼5.5044.22 ▲0.48
Campaigns /wp-admin/admin.php?page=letterpress-campaigns8012.0024.5825.43
Cron Job /wp-admin/admin.php?page=letterpress-cron1,0102.1123.3327.54
LetterPress /wp-admin/admin.php?page=letterpress9251.9930.3435.64
Subscribers /wp-admin/admin.php?page=letterpress-subscribers9392.0028.3026.78
Settings /wp-admin/admin.php?page=letterpress-settings8982.0427.5527.92

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie tables were found after uninstall: 2 tables
    • wp_lp_campaigns
    • wp_lp_subscribers
  • This plugin does not fully uninstall, leaving 8 options in the database
    • db_upgraded
    • widget_recent-comments
    • lp_last_checked_time
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • LPRESS_VERSION
    • can_compress_scripts

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)
Good news, no errors were detected

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 items
  • 12× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/letterpress/views/letterpress-settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/letterpress/views/add_campaign.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/letterpress/views/letterpress.php:2
    • > 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/letterpress/classes/Subscribers_List.php on line 7
    • > 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/letterpress/classes/Subscribers_List.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/letterpress/template/email-header.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/letterpress/views/letterpress-campaigns.php:1
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/letterpress/classes/Subscribers_List.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/letterpress/views/letterpress-subscribers.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/letterpress/views/edit_campaign.php:6

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

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
9 plugin tags: communication, email marketing, marketing strategy, subscription, email...

letterpress/letterpress.php 92% from 13 tests

The principal PHP file in "LetterPress - Elevate Your WordPress Site's E-Mail Campaigns and Marketing" v. 1.2.1 is loaded by WordPress automatically on each request
The following require your attention:
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin1,217 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP193322301,121
CSS14196

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity9.00
▷ Minimum class complexity3.00
▷ Maximum class complexity17.00
Average method complexity1.92
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods61
▷ Static methods11.64%
▷ Public methods5996.72%
▷ Protected methods00.00%
▷ Private methods23.28%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin