52% welcome-mat

Code Review | Welcome Mat

WordPress plugin Welcome Mat scored52%from 54 tests.

About plugin

  • Plugin page: welcome-mat
  • Plugin version: 1.8
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-5.4
  • WordPress version: 6.3.1
  • First release: Aug 2, 2016
  • Latest release: Jul 13, 2020
  • Number of updates: 29
  • Update frequency: every 50.4 days
  • Top authors: basszje (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

50+ active /5,887 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.79MB] [CPU: ▼27.29ms] Passed 4 tests

A check of server-side resources used by Welcome Mat
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.73 ▲1.2727.15 ▼11.67
Dashboard /wp-admin4.80 ▲1.5033.91 ▼13.27
Posts /wp-admin/edit.php4.81 ▲1.4531.18 ▼16.80
Add New Post /wp-admin/post-new.php4.80 ▼1.0829.95 ▼67.41
Media Library /wp-admin/upload.php4.81 ▲1.5837.46 ▲2.48
Add new /wp-admin/edit.php?post_type=mf_mat&page=maxinbound_new4.8125.20
Welcome Mat /wp-admin/edit.php?post_type=mf_mat4.8127.44
Statistics /wp-admin/edit.php?post_type=mf_mat&page=basic_statistics4.8128.50
Emails /wp-admin/edit.php?post_type=mf_mat&page=basic_email4.8126.80
Settings /wp-admin/edit.php?post_type=mf_mat&page=maxinbound-settings4.8127.55

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 517 new files
Database: 2 new tables, 8 new options
New tables
wp_mi_stats
wp_mi_contacts
New WordPress options
widget_recent-posts
widget_recent-comments
welcome-mat_uninstall
theysaidso_admin_options
can_compress_scripts
mf_welcomemat_version
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Welcome Mat
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,841 ▲9513.21 ▼1.192.18 ▲0.3455.35 ▲10.50
Dashboard /wp-admin2,232 ▲444.85 ▼0.9498.53 ▼9.4772.20 ▲33.06
Posts /wp-admin/edit.php2,124 ▲352.02 ▲0.0336.95 ▲0.1032.79 ▼1.94
Add New Post /wp-admin/post-new.php1,550 ▲3120.97 ▼2.08680.11 ▲26.3367.37 ▲10.02
Media Library /wp-admin/upload.php1,423 ▲354.22 ▼0.03110.26 ▲10.1874.90 ▲29.25
Add new /wp-admin/edit.php?post_type=mf_mat&page=maxinbound_new1,2683.3653.30104.32
Welcome Mat /wp-admin/edit.php?post_type=mf_mat1,3323.6650.2379.54
Statistics /wp-admin/edit.php?post_type=mf_mat&page=basic_statistics2,2125.82100.94100.19
Emails /wp-admin/edit.php?post_type=mf_mat&page=basic_email1,0533.4143.9580.23
Settings /wp-admin/edit.php?post_type=mf_mat&page=maxinbound-settings1,6503.7448.0270.43

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/welcome-mat/welcomemat-pro/modules/campaignmonitor/cm/class/services_json.php+156
    Array and string offset access syntax with curly braces is deprecated
  • The plugin did not uninstall successfully, leaving 2 tables in the database
    • wp_mi_stats
    • wp_mi_contacts
  • This plugin does not fully uninstall, leaving 9 options in the database
    • db_upgraded
    • mf_welcomemat_version
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • 450e54a196ce924f101490c91b120a54
    • welcome-mat_uninstall

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
  • 560 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=mf_mat&page=maxinbound-settings
    • > Deprecated in wp-content/plugins/welcome-mat/welcomemat-pro/modules/campaignmonitor/cm/class/services_json.php+725
    Array and string offset access syntax with curly braces is deprecated

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
Almost there! Just fix the following items
  • 78× PHP files output non-empty strings when accessed directly via GET requests (only 10 are shown):
    • > /wp-content/plugins/welcome-mat/welcomemat-pro/modules/mailchimp/mailchimp.php
    • > /wp-content/plugins/welcome-mat/modules/removal/removal.php
    • > /wp-content/plugins/welcome-mat/modules/basic_stats/stats_screen.php
    • > /wp-content/plugins/welcome-mat/classes/whistle.php
    • > /wp-content/plugins/welcome-mat/welcomemat.php
    • > /wp-content/plugins/welcome-mat/modules/general/_support_settings.php
    • > /wp-content/plugins/welcome-mat/admin/system_metabox.php
    • > /wp-content/plugins/welcome-mat/admin/template_picker.php
    • > /wp-content/plugins/welcome-mat/welcomemat-pro/modules/stats_pro/stats_pro.php
    • > /wp-content/plugins/welcome-mat/admin/editor.php
  • 136× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'AWeberResponse' not found in wp-content/plugins/welcome-mat/welcomemat-pro/modules/aweber/aweber_api/_aweber_entry.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Processor\\MemoryProcessor' not found in wp-content/plugins/welcome-mat/assets/libraries/monolog/Monolog/Processor/MemoryPeakUsageProcessor.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\AbstractProcessingHandler' not found in wp-content/plugins/welcome-mat/assets/libraries/monolog/Monolog/Handler/PHPConsoleHandler.php:40
    • > PHP Fatal error
      Uncaught Error: Interface 'Sabberworm\\CSS\\Renderable' not found in wp-content/plugins/welcome-mat/assets/libraries/Sabberworm/CSS/Rule/Rule.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\AbstractProcessingHandler' not found in wp-content/plugins/welcome-mat/assets/libraries/monolog/Monolog/Handler/ErrorLogHandler.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\AbstractProcessingHandler' not found in wp-content/plugins/welcome-mat/assets/libraries/monolog/Monolog/Handler/SlackbotHandler.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Psr\\Log\\AbstractLogger' not found in wp-content/plugins/welcome-mat/assets/libraries/psrlog/Psr/Log/NullLogger.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\AbstractProcessingHandler' not found in wp-content/plugins/welcome-mat/assets/libraries/monolog/Monolog/Handler/GelfHandler.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\AbstractProcessingHandler' not found in wp-content/plugins/welcome-mat/assets/libraries/monolog/Monolog/Handler/CouchDBHandler.php:22
    • > PHP Fatal error
      Uncaught Error: Interface 'Monolog\\Formatter\\FormatterInterface' not found in wp-content/plugins/welcome-mat/assets/libraries/monolog/Monolog/Formatter/FlowdockFormatter.php:19

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 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
6 plugin tags: mailing list, subscription, newsletter, inbound marketing, welcome mat...

welcome-mat/welcomemat.php 92% from 13 tests

The main file in "Welcome Mat" v. 1.8 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:
  • Main file name: The principal plugin file should be the same as the plugin slug ("welcome-mat.php" instead of "welcomemat.php")

Code Analysis 97% from 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
Success! There were no dangerous files found in this plugin73,782 lines of code in 397 files:
LanguageFilesBlank linesComment linesLines of code
PHP2838,95213,42232,790
JSON33015,572
JavaScript191,1705808,637
CSS301762797,027
Sass501,1331096,758
SVG1002,671
XML8340247
Markdown336080

PHP code 50% from 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
It is recommended to fix the following
  • Method cyclomatic complexity should be reduced to less than 100 (currently 155)
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity19.72
▷ Minimum class complexity1.00
▷ Maximum class complexity581.00
Average method complexity3.30
▷ Minimum method complexity1.00
▷ Maximum method complexity155.00
Code structure
Namespaces26
Interfaces13
Traits2
Classes273
▷ Abstract classes165.86%
▷ Concrete classes25794.14%
▷ Final classes00.00%
Methods2,412
▷ Static methods1315.43%
▷ Public methods1,76773.26%
▷ Protected methods52521.77%
▷ Private methods1204.98%
Functions52
▷ Named functions1630.77%
▷ Anonymous functions3669.23%
Constants270
▷ Global constants14252.59%
▷ Class constants12847.41%
▷ Public constants128100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
9 PNG files occupy 0.47MB with 0.27MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/image_placeholder.png12.63KB7.46KB▼ 40.95%
images/colpick_transparent_rounded.png0.29KB0.18KB▼ 39.06%
images/gopro/template_thumbs.png329.51KB82.57KB▼ 74.94%
images/gopro/integration_graphic.png45.58KB13.40KB▼ 70.59%
images/colpick_transparent.png0.22KB0.10KB▼ 57.02%