68% mailchimp-shortcode

Code Review | MailChimp Shortcode

WordPress plugin MailChimp Shortcode scored68%from 54 tests.

About plugin

  • Plugin page: mailchimp-shortcode
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.1
  • WordPress version: 6.3.1
  • First release: Mar 11, 2015
  • Latest release: Mar 27, 2015
  • Number of updates: 3
  • Update frequency: every 5.3 days
  • Top authors: kynatro (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,741 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼1.17MB] [CPU: ▼38.81ms] Passed 4 tests

This is a short check of server-side resources used by MailChimp Shortcode
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0440.22 ▲0.65
Dashboard /wp-admin2.77 ▼0.5318.26 ▼33.15
Posts /wp-admin/edit.php2.77 ▼0.5818.09 ▼26.98
Add New Post /wp-admin/post-new.php2.77 ▼3.1116.37 ▼76.87
Media Library /wp-admin/upload.php2.77 ▼0.4615.45 ▼18.23

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 21 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

MailChimp Shortcode: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.23 ▼0.121.80 ▲0.1644.03 ▲4.54
Dashboard /wp-admin2,195 ▲185.58 ▼0.0892.23 ▼6.3244.45 ▲7.84
Posts /wp-admin/edit.php2,097 ▼31.98 ▼0.0136.41 ▲0.2331.31 ▼5.36
Add New Post /wp-admin/post-new.php1,539 ▲1324.85 ▲1.99582.65 ▼31.5863.75 ▲10.95
Media Library /wp-admin/upload.php1,397 ▼04.14 ▼0.06103.39 ▲1.2143.99 ▼0.05

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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
  • The plugin did not uninstall gracefully
    • > Warning in wp-content/plugins/mailchimp-shortcode/mailchimp-shortcode.php+65
    Use of undefined constant DOING_AJAX - assumed 'DOING_AJAX' (this will throw an Error in a future version of PHP)
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
Please fix the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/mailchimp-shortcode/views/form.php
  • 22× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/mailchimp-shortcode/views/form.php on line 14
    • > PHP Notice
      Undefined variable: groupings in wp-content/plugins/mailchimp-shortcode/views/form.php on line 14
    • > PHP Notice
      Undefined variable: nonce_field in wp-content/plugins/mailchimp-shortcode/views/form.php on line 5
    • > PHP Notice
      Undefined variable: slug in wp-content/plugins/mailchimp-shortcode/views/form.php on line 38
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mailchimp-shortcode/mailchimp-shortcode.php:71
    • > PHP Notice
      Undefined variable: slug in wp-content/plugins/mailchimp-shortcode/views/form.php on line 8
    • > PHP Notice
      Undefined variable: slug in wp-content/plugins/mailchimp-shortcode/views/form.php on line 7
    • > PHP Notice
      Undefined variable: redirect_to in wp-content/plugins/mailchimp-shortcode/views/form.php on line 10
    • > PHP Notice
      Undefined variable: slug in wp-content/plugins/mailchimp-shortcode/views/form.php on line 48
    • > PHP Notice
      Undefined variable: action in wp-content/plugins/mailchimp-shortcode/views/form.php on line 1

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
2 plugin tags: filament, mailchimp

mailchimp-shortcode/mailchimp-shortcode.php Passed 13 tests

This is the main PHP file of "MailChimp Shortcode" version 1.0.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
38 characters long description:
Shortcode generator for MailChimp form

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected1,064 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP193542,3931,064

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity1.37
▷ Minimum class complexity1.00
▷ Maximum class complexity23.00
Average method complexity1.28
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes111
▷ Abstract classes00.00%
▷ Concrete classes111100.00%
▷ Final classes00.00%
Methods145
▷ Static methods00.00%
▷ Public methods14499.31%
▷ Protected methods00.00%
▷ Private methods10.69%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants10100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin