78% post-to-mailchimp

Code Review | Post to Mailchimp

WordPress plugin Post to Mailchimp scored78%from 54 tests.

About plugin

  • Plugin page: post-to-mailchimp
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9.8
  • WordPress version: 6.3.1
  • First release: Nov 13, 2018
  • Latest release: Nov 13, 2018
  • Number of updates: 2
  • Update frequency: every 4.0 days
  • Top authors: EdwardBock (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /842 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
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▲1.76ms] Passed 4 tests

Server-side resources used by Post to Mailchimp
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0337.70 ▲0.08
Dashboard /wp-admin3.33 ▲0.0348.52 ▲3.97
Posts /wp-admin/edit.php3.38 ▲0.0344.60 ▲0.12
Add New Post /wp-admin/post-new.php5.92 ▲0.0399.49 ▲10.77
Media Library /wp-admin/upload.php3.26 ▲0.0334.69 ▲2.85
Post to Mailchimp /wp-admin/options-general.php?page=ph_mailchimp_settings3.2231.09

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 39 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Post to Mailchimp
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲5714.69 ▲0.421.90 ▼0.0745.82 ▲4.88
Dashboard /wp-admin2,196 ▲195.65 ▲0.1289.23 ▼5.3140.69 ▲0.89
Posts /wp-admin/edit.php2,104 ▲72.03 ▲0.0433.95 ▼3.8933.52 ▼2.01
Add New Post /wp-admin/post-new.php6,236 ▲4,70718.83 ▼4.08909.70 ▲267.2254.51 ▲0.09
Media Library /wp-admin/upload.php1,407 ▲74.30 ▲0.0995.44 ▼7.5444.12 ▼0.17
Post to Mailchimp /wp-admin/options-general.php?page=ph_mailchimp_settings8082.1227.1939.75

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
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/post-to-mailchimp/templates/post-plaintext-to-mailchimp.php
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function the_title() in wp-content/plugins/post-to-mailchimp/templates/post-to-mailchimp.php:7
    • > PHP Notice
      Trying to get property 'post_content' of non-object in wp-content/plugins/post-to-mailchimp/templates/post-plaintext-to-mailchimp.php on line 11
    • > PHP Notice
      Trying to get property 'post_title' of non-object in wp-content/plugins/post-to-mailchimp/templates/post-plaintext-to-mailchimp.php on line 9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention: The official readme.txt might help

post-to-mailchimp/plugin.php 85% from 13 tests

The principal PHP file in "Post to Mailchimp" v. 1.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 ("post-to-mailchimp.php" instead of "plugin.php")
  • Text Domain: The text domain should only use lowercase characters and dashes

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 plugin2,123 lines of code in 30 files:
LanguageFilesBlank linesComment linesLines of code
PHP183317111,353
JavaScript25939281
Markdown31080251
PO File1384198
JSON33078
Sass18051
CSS19110
SVG1001

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity15.00
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.55
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods98
▷ Static methods88.16%
▷ Public methods8283.67%
▷ Protected methods00.00%
▷ Private methods1616.33%
Functions10
▷ Named functions770.00%
▷ Anonymous functions330.00%
Constants20
▷ Global constants00.00%
▷ Class constants20100.00%
▷ Public constants20100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin