78% woo-mensagia

Code Review | Mensagia for WooCommerce

WordPress plugin Mensagia for WooCommerce scored 78% from 54 tests.

About plugin

  • Plugin page: woo-mensagia
  • Plugin version: 1.6
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.9.1
  • WordPress version: 6.3.1
  • First release: Sep 15, 2017
  • Latest release: Mar 2, 2022
  • Number of updates: 9
  • Update frequency: every 181.0 days
  • Top authors: sinermedia (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 829 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼1.66ms] Passed 4 tests

An overview of server-side resources used by Mensagia for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0040.76 ▲0.36
Dashboard /wp-admin3.31 ▲0.0044.99 ▼4.99
Posts /wp-admin/edit.php3.36 ▲0.0046.12 ▼1.22
Add New Post /wp-admin/post-new.php5.89 ▲0.0087.80 ▼0.79
Media Library /wp-admin/upload.php3.23 ▲0.0036.77 ▲3.95

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

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

Browser metrics Passed 4 tests

Mensagia for WooCommerce: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.48 ▲0.251.73 ▼0.0444.39 ▲0.43
Dashboard /wp-admin2,206 ▲185.79 ▼0.1298.78 ▼5.7538.72 ▼5.19
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0239.39 ▼1.8435.87 ▼1.40
Add New Post /wp-admin/post-new.php1,533 ▲1923.30 ▲5.801,053.83 ▲387.3461.56 ▲2.91
Media Library /wp-admin/upload.php1,391 ▲34.20 ▼0.09101.88 ▲0.8844.86 ▲0.70

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
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

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
Good news, no errors were detected

SRP 0% 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
Please take a closer look at the following
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/woo-mensagia/views/partials/vars.php
    • > /wp-content/plugins/woo-mensagia/woo-mensagia.php
  • 18× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Notice
      Undefined variable: customer_all in wp-content/plugins/woo-mensagia/views/partials/vars.php on line 30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/woo-mensagia/views/export.php:2
    • > PHP Notice
      Undefined variable: customer_basic in wp-content/plugins/woo-mensagia/views/partials/vars.php on line 2
    • > PHP Notice
      Undefined variable: pedido in wp-content/plugins/woo-mensagia/views/partials/vars.php on line 48
    • > PHP Notice
      Undefined variable: refunds in wp-content/plugins/woo-mensagia/views/partials/vars.php on line 75
    • > PHP Notice
      Undefined variable: customer_basic in wp-content/plugins/woo-mensagia/views/partials/vars.php on line 9
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/woo-mensagia/views/partials/textarea.php on line 6
    • > PHP Notice
      Undefined variable: languages in wp-content/plugins/woo-mensagia/views/partials/textarea.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/woo-mensagia/views/partials/modalDemo.php:7
    • > PHP Notice
      Undefined variable: tienda in wp-content/plugins/woo-mensagia/views/partials/vars.php on line 37

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Tags: There are too many tags (11 tag instead of maximum 10)
The official readme.txt is a good inspiration

woo-mensagia/woo-mensagia.php Passed 13 tests

"Mensagia for WooCommerce" version 1.6's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
136 characters long description:
Connect your ecommerce with Mensagia to create hypersegmented campaigns and send automatic notifications through SMS or Email Marketing.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin18,028 lines of code in 44 files:
LanguageFilesBlank linesComment linesLines of code
CSS629447,404
PO File111,8922,1454,602
PHP179011533,569
JavaScript77272302,150
SVG200300
LESS1003

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity30.88
▷ Minimum class complexity2.00
▷ Maximum class complexity87.00
Average method complexity4.03
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods79
▷ Static methods1620.25%
▷ Public methods5569.62%
▷ Protected methods00.00%
▷ Private methods2430.38%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
3 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/logo-icon-mensagia.png1.28KB0.81KB▼ 36.54%
img/logo_petit_black.png1.57KB1.47KB▼ 6.40%
img/mensagia.png1.57KB1.47KB▼ 6.40%