84% another-mailchimp-widget

Code Review | Another Mailchimp Widget

WordPress plugin Another Mailchimp Widget scored84%from 54 tests.

About plugin

  • Plugin page: another-mailchimp...
  • Plugin version: 2.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-6.2
  • WordPress version: 6.3.1
  • First release: Nov 11, 2015
  • Latest release: Apr 6, 2023
  • Number of updates: 42
  • Update frequency: every 64.4 days
  • Top authors: MotoPress (69.05%)jetmonsters (33.33%)

Code review

54 tests

User reviews

8 reviews

Install metrics

6,000+ active /88,288 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.11MB] [CPU: ▲0.12ms] Passed 4 tests

Analyzing server-side resources used by Another Mailchimp Widget
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1241.92 ▲4.20
Dashboard /wp-admin3.42 ▲0.1143.28 ▼3.34
Posts /wp-admin/edit.php3.53 ▲0.1747.45 ▲0.81
Add New Post /wp-admin/post-new.php6.00 ▲0.1190.69 ▼1.20
Media Library /wp-admin/upload.php3.34 ▲0.1136.91 ▲5.18
Mailchimp /wp-admin/options-general.php?page=another-mailchimp-widget/lib/an_mc_plugin.class.php3.3132.29

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Another Mailchimp Widget
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲7213.22 ▼1.164.71 ▲2.9143.47 ▲2.55
Dashboard /wp-admin2,213 ▲224.85 ▲0.02106.30 ▲6.9640.37 ▲2.72
Posts /wp-admin/edit.php2,096 ▲72.03 ▲0.0439.15 ▼1.7834.41 ▼2.13
Add New Post /wp-admin/post-new.php1,539 ▲623.10 ▼0.25667.54 ▲4.5254.34 ▼8.28
Media Library /wp-admin/upload.php1,395 ▲74.22 ▼0.0295.14 ▼7.9640.74 ▼6.78
Mailchimp /wp-admin/options-general.php?page=another-mailchimp-widget/lib/an_mc_plugin.class.php9042.0222.9433.90

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
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_an-mailchimp
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 11× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/another-mailchimp-widget/templates/notice/empty-list.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/another-mailchimp-widget/templates/notice/invalid-api-key.php:2
    • > PHP Notice
      Undefined variable: lists in wp-content/plugins/another-mailchimp-widget/templates/mailchimp-lists.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/another-mailchimp-widget/templates/notice/change-settings.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/another-mailchimp-widget/another-mailchimp-widget.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/another-mailchimp-widget/lib/Default_MC.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/another-mailchimp-widget/shortcodes/registrator.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/another-mailchimp-widget/templates/admin/notice.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/another-mailchimp-widget/lib/Default_MC.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'AN_MC_Plugin' not found in wp-content/plugins/another-mailchimp-widget/shortcodes/forms/an_shortcode_mailchimp.php:3

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed: The official readme.txt is a good inspiration

another-mailchimp-widget/another-mailchimp-widget.php Passed 13 tests

This is the main PHP file of "Another Mailchimp Widget" version 2.1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
60 characters long description:
Simple Mailchimp subscription form to your lists and groups.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin1,590 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PHP163696151,471
JavaScript4328107
LESS10010
CSS1001
SVG1001

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity23.86
▷ Minimum class complexity1.00
▷ Maximum class complexity46.00
Average method complexity2.45
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes114.29%
▷ Concrete classes685.71%
▷ Final classes00.00%
Methods99
▷ Static methods66.06%
▷ Public methods7474.75%
▷ Protected methods1717.17%
▷ Private methods88.08%
Functions12
▷ Named functions866.67%
▷ Anonymous functions433.33%
Constants6
▷ Global constants6100.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
No PNG images were found in this plugin