84% activecampaign-newsletter-subscription

Code Review | ActiveCampaign Newsletter Subscription

WordPress plugin ActiveCampaign Newsletter Subscription scored84%from 54 tests.

About plugin

  • Plugin page: activecampaign-ne...
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.0
  • WordPress version: 6.3.1
  • First release: Apr 16, 2022
  • Latest release: Jun 15, 2022
  • Number of updates: 8
  • Update frequency: every 7.6 days
  • Top authors: hackkzy404 (62.5%)biliplugins (50%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /790 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.06MB] [CPU: ▼7.79ms] Passed 4 tests

This is a short check of server-side resources used by ActiveCampaign Newsletter Subscription
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0733.01 ▼6.84
Dashboard /wp-admin3.37 ▲0.0643.70 ▼1.97
Posts /wp-admin/edit.php3.48 ▲0.1248.75 ▼3.72
Add New Post /wp-admin/post-new.php5.95 ▲0.0679.74 ▼18.63
Media Library /wp-admin/upload.php3.29 ▲0.0633.71 ▲0.99

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for ActiveCampaign Newsletter Subscription
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲4414.23 ▼0.351.64 ▼0.1443.44 ▼3.40
Dashboard /wp-admin2,214 ▲375.63 ▼0.0581.80 ▼14.0638.94 ▼0.89
Posts /wp-admin/edit.php2,116 ▲162.02 ▲0.0234.17 ▼7.8236.64 ▼0.79
Add New Post /wp-admin/post-new.php1,539 ▲1123.18 ▼0.04661.91 ▼10.5260.60 ▼3.64
Media Library /wp-admin/upload.php1,410 ▲104.20 ▼0.0796.53 ▼0.0941.62 ▼5.51

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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 take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/activecampaign-newsletter-subscription/activecampaign-newsletter-subscription.php:31

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 undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
4 plugin tags: newsletter, newsletter subscription, activecampaign, active campaign

activecampaign-newsletter-subscription/activecampaign-newsletter-subscription.php 92% from 13 tests

The principal PHP file in "ActiveCampaign Newsletter Subscription" v. 1.0.2 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected385 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP469126280
PO File1192260
Markdown115045

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity14.00
▷ Minimum class complexity8.00
▷ Maximum class complexity20.00
Average method complexity4.25
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
3 PNG files occupy 0.23MB with 0.13MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png23.95KB11.33KB▼ 52.72%
screenshot-3.png145.58KB49.26KB▼ 66.17%
screenshot-1.png63.94KB33.13KB▼ 48.19%