78% aksh-mailchimp-widget

Code Review | Aksh Mailchimp Widget

WordPress plugin Aksh Mailchimp Widget scored78%from 54 tests.

About plugin

  • Plugin page: aksh-mailchimp-wi...
  • Plugin version: 4.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.2.2
  • WordPress version: 6.3.1
  • First release: Nov 21, 2014
  • Latest release: May 20, 2015
  • Number of updates: 10
  • Update frequency: every 18.3 days
  • Top authors: manish2384 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,987 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.10MB] [CPU: ▼4.21ms] Passed 4 tests

An overview of server-side resources used by Aksh Mailchimp Widget
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /61.92 ▲58.4112,082,161.83 ▲12,082,116.36
Dashboard /wp-admin3.43 ▲0.0952.46 ▼8.72
Posts /wp-admin/edit.php3.55 ▲0.1557.57 ▲3.61
Add New Post /wp-admin/post-new.php6.01 ▲0.08101.38 ▼6.91
Media Library /wp-admin/upload.php3.36 ▲0.0836.10 ▼4.82
Aksh MailChimp /wp-admin/options-general.php?page=aksh-mailchimp3.3035.42

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 12 new files
Database: no new tables, 8 new options
New WordPress options
aksh_mailchimp
db_upgraded
widget_theysaidso_widget
widget_akshmailchimpwidget
can_compress_scripts
widget_recent-posts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Aksh Mailchimp Widget
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.37 ▲0.021.62 ▼0.3939.96 ▼4.04
Dashboard /wp-admin2,193 ▲195.62 ▲0.0294.54 ▲0.1743.26 ▼3.99
Posts /wp-admin/edit.php2,107 ▲42.01 ▲0.0040.27 ▲1.1037.77 ▲5.00
Add New Post /wp-admin/post-new.php1,529 ▼823.04 ▲4.94667.01 ▼12.1157.23 ▼11.00
Media Library /wp-admin/upload.php1,398 ▲14.20 ▼0.0195.04 ▼7.9141.37 ▼3.97
Aksh MailChimp /wp-admin/options-general.php?page=aksh-mailchimp9432.0023.8034.54

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
The following items require your attention
  • This plugin does not fully uninstall, leaving 8 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • aksh_mailchimp
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_akshmailchimpwidget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=aksh-mailchimp
    • > Notice in wp-content/plugins/aksh-mailchimp-widget/include/aksh_admin.php+49
    Undefined index: aksh_form_labelname
    • > GET request to /wp-admin/options-general.php?page=aksh-mailchimp
    • > Notice in wp-content/plugins/aksh-mailchimp-widget/include/aksh_admin.php+55
    Undefined index: aksh_form_labelemail
    • > GET request to /wp-admin/options-general.php?page=aksh-mailchimp
    • > Notice in wp-content/plugins/aksh-mailchimp-widget/include/aksh_admin.php+61
    Undefined index: aksh_form_labelsubscribe
    • > GET request to /wp-admin/options-general.php?page=aksh-mailchimp
    • > Notice in wp-content/plugins/aksh-mailchimp-widget/include/aksh_admin.php+65
    Undefined index: form_ishidenamefield
    • > GET request to /wp-admin/options-general.php?page=aksh-mailchimp
    • > Notice in wp-content/plugins/aksh-mailchimp-widget/include/aksh_admin.php+68
    Undefined index: form_isplaceholder
    • > GET request to /wp-admin/options-general.php?page=aksh-mailchimp
    • > Notice in wp-content/plugins/aksh-mailchimp-widget/include/aksh_admin.php+71
    Undefined index: amcw_double_opt_in
  • 13 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=aksh-mailchimp
    • > POST request to /wp-cron.php?doing_wp_cron=1697551793.8827230930328369140625
    • > Warning in wp-content/plugins/easy-age-verifier/lib/extras/wpApi.php+48
    file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known
  • 13 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=aksh-mailchimp
    • > POST request to /wp-cron.php?doing_wp_cron=1697551793.8827230930328369140625
    • > Warning in wp-content/plugins/easy-age-verifier/lib/extras/wpApi.php+48
    file_get_contents(http://www.fillyourtaproom.com/wp-json/wp/v2/posts?per_page=10): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known

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
The following issues need your attention
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/aksh-mailchimp-widget/aksh-mailchimpwidget.php:40
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/aksh-mailchimp-widget/include/aksh_widget.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Screenshots: These screenshots do not have images: #1 (Settings of your MailChimp API keys, MailChimp list id and various settings for MailChimp Sign up form.), #2 (Widget settings in Appearance->Widgets), #3 (MailChimp Sign up without Name field and labels as placeholder and with text before sign up form and text after sign up form.), #4 (MailChimp Sign up form with Name field and labels as placeholder and with text before sign up form and text after sign up form.), #5 (MailChimp Sign up form with labels in label HTML tag.)
You can take inspiration from this readme.txt

aksh-mailchimp-widget/aksh-mailchimpwidget.php 85% from 13 tests

The main file in "Aksh Mailchimp Widget" v. 4.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 154 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("aksh-mailchimp-widget.php" instead of "aksh-mailchimpwidget.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin422 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP41839373
JavaScript11149

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity12.00
▷ Minimum class complexity6.00
▷ Maximum class complexity18.00
Average method complexity3.44
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
6 PNG files occupy 0.29MB with 0.18MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-4.png61.50KB23.71KB▼ 61.44%
images/MailchimpIcon.png3.55KB0.94KB▼ 73.54%
screenshot-2.png24.14KB9.15KB▼ 62.12%
screenshot-5.png37.86KB14.75KB▼ 61.03%
screenshot-1.png68.94KB25.52KB▼ 62.98%