42% postmarkapp-mail-replacement

Code Review | PostMarkApp Mail Replacement

WordPress plugin PostMarkApp Mail Replacement scored42%from 54 tests.

About plugin

  • Plugin page: postmarkapp-mail-...
  • Plugin version: 1.3.2
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-3.1
  • WordPress version: 6.3.1
  • First release: Feb 15, 2011
  • Latest release: Oct 21, 2018
  • Number of updates: 28
  • Update frequency: every 100.2 days
  • Top authors: tmertz (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,543 total downloads

Benchmarks

Plugin footprint 30% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼9.61ms] Passed 4 tests

This is a short check of server-side resources used by PostMarkApp Mail Replacement
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0439.87 ▼4.02
Dashboard /wp-admin3.35 ▲0.0149.09 ▼18.72
Posts /wp-admin/edit.php3.40 ▲0.0549.46 ▼2.39
Add New Post /wp-admin/post-new.php5.93 ▲0.0593.16 ▼10.12
Media Library /wp-admin/upload.php3.27 ▲0.0539.02 ▼5.58
Logs /wp-admin/admin.php?page=postmark-logs3.2134.33
PostMarkApp /wp-admin/admin.php?page=postmark-menu3.2134.44

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 4 new files
Database: 1 new table, 7 new options
New tables
wp_pm_wp_mail_log
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
widget_recent-posts
pm_wp_mail_db_version
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for PostMarkApp Mail Replacement
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲8113.23 ▼1.051.72 ▼0.1943.22 ▼0.12
Dashboard /wp-admin2,230 ▲425.80 ▼0.05100.30 ▼13.1046.49 ▲3.37
Posts /wp-admin/edit.php2,113 ▲212.13 ▲0.1237.35 ▼0.1931.45 ▼2.94
Add New Post /wp-admin/post-new.php1,564 ▲2818.35 ▼4.67615.66 ▼88.0048.88 ▼16.11
Media Library /wp-admin/upload.php1,412 ▲244.36 ▲0.25102.68 ▼16.2445.07 ▼3.45
Logs /wp-admin/admin.php?page=postmark-logs8352.0529.9428.55
PostMarkApp /wp-admin/admin.php?page=postmark-menu9052.0526.5027.50

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/postmarkapp-mail-replacement/postmarkmail.php+74
    Undefined variable: wpdb
  • This plugin has failed uninstalling correctly, leaving 4 files (0.23MB) in the plugin directory
    • (new file) certificate/cacert.pem
    • (new file) readme.txt
    • (new file) functions.php
    • (new file) postmarkmail.php
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_pm_wp_mail_log
  • The uninstall procedure has failed, leaving 8 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • pm_wp_mail_db_version
    • widget_recent-comments
    • widget_theysaidso_widget
    • recovery_mode_email_last_sent

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=postmark-menu
    • > Notice in wp-content/plugins/postmarkapp-mail-replacement/postmarkmail.php+180
    Undefined index: action
    • > GET request to /wp-admin/admin.php?page=postmark-menu
    • > Notice in wp-content/plugins/postmarkapp-mail-replacement/postmarkmail.php+187
    Undefined index: pm-wp-mail-update-options

SRP 50% 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
Please fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/postmarkapp-mail-replacement/postmarkmail.php:61

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
These are user-side errors you should fix
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=postmark-menu
    • > Network (severe)
    wp-content/plugins/postmarkapp-mail-replacement/stupid_logo.png - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === postmarkapp-mail-replacement === )
You can look at the official readme.txt

postmarkapp-mail-replacement/postmarkmail.php 85% from 13 tests

The principal PHP file in "PostMarkApp Mail Replacement" v. 1.3.2 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("postmarkapp-mail-replacement.php" instead of "postmarkmail.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 231 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin242 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP27530242

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.09
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
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
There are no PNG files in this plugin