84% postmark-approved-wordpress-plugin

Code Review | ActiveCampaign Postmark for Wordpress

WordPress plugin ActiveCampaign Postmark for Wordpress scored84%from 54 tests.

About plugin

  • Plugin page: postmark-approved...
  • Plugin version: 1.20.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.2
  • WordPress version: 6.3.1
  • First release: Aug 10, 2011
  • Latest release: Oct 31, 2023
  • Number of updates: 206
  • Update frequency: every 21.7 days
  • Top authors: prileygraham (81.07%)atheken (12.62%)alexknowshtml (3.88%)jptoto (2.91%)andy7629 (1.46%)

Code review

54 tests

User reviews

28 reviews

Install metrics

40,000+ active /647,068 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼9.23ms] Passed 4 tests

Analyzing server-side resources used by ActiveCampaign Postmark for Wordpress
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0938.38 ▲1.86
Dashboard /wp-admin3.39 ▲0.0446.52 ▼19.46
Posts /wp-admin/edit.php3.51 ▲0.1449.26 ▲2.70
Add New Post /wp-admin/post-new.php5.97 ▲0.0886.24 ▼20.56
Media Library /wp-admin/upload.php3.31 ▲0.0837.35 ▲1.26
ActiveCampaign Postmark /wp-admin/options-general.php?page=ac_pm_admin3.31343.86

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 11 new files
Database: 1 new table, 7 new options
New tables
wp_postmark_log
New WordPress options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
postmark_settings
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for ActiveCampaign Postmark for Wordpress
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.16 ▼0.601.58 ▼0.2038.79 ▼4.53
Dashboard /wp-admin2,196 ▲195.65 ▼0.0282.80 ▼2.2141.07 ▲2.63
Posts /wp-admin/edit.php2,107 ▲72.00 ▼0.0339.40 ▲0.8336.31 ▲0.28
Add New Post /wp-admin/post-new.php1,531 ▲323.34 ▲0.21658.78 ▼5.2465.92 ▲6.31
Media Library /wp-admin/upload.php1,404 ▲44.18 ▲0.0292.51 ▼22.3239.82 ▼7.19
ActiveCampaign Postmark /wp-admin/options-general.php?page=ac_pm_admin1,1362.2727.7927.20

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • postmark_settings
    • widget_recent-posts

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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_json_encode() in wp-content/plugins/postmark-approved-wordpress-plugin/page-settings.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/postmark-approved-wordpress-plugin/postmark.php:412
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/postmark-approved-wordpress-plugin/postmark.php:412
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/postmark-approved-wordpress-plugin/postmark-settings.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/postmark-approved-wordpress-plugin/includes/class-postmark-debug.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
6 plugin tags: email, smtp, wildbit, notifications, wp_mail...

postmark-approved-wordpress-plugin/postmark.php 92% from 13 tests

The principal PHP file in "ActiveCampaign Postmark for Wordpress" v. 1.20.0 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 ("postmark-approved-wordpress-plugin.php" instead of "postmark.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin1,019 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP5210221878
JavaScript1161387
CSS112054

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.58
Average class complexity29.00
▷ Minimum class complexity5.00
▷ Maximum class complexity53.00
Average method complexity6.09
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods1090.91%
▷ Protected methods00.00%
▷ Private methods19.09%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/logo.png7.79KB4.54KB▼ 41.76%
assets/images/logo.png7.79KB4.54KB▼ 41.76%