78% mergado-marketing-pack

Code Review | Mergado Pack

WordPress plugin Mergado Pack scored78%from 54 tests.

About plugin

  • Plugin page: mergado-marketing...
  • Plugin version: 3.7.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.4
  • WordPress version: 6.3.1
  • First release: Oct 12, 2017
  • Latest release: Nov 24, 2023
  • Number of updates: 232
  • Update frequency: every 9.6 days
  • Top authors: mergado (100%)

Code review

54 tests

User reviews

17 reviews

Install metrics

800+ active /24,126 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼7.88ms] Passed 4 tests

Server-side resources used by Mergado Pack
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.37 ▼0.02
Dashboard /wp-admin3.31 ▼0.0452.21 ▼12.91
Posts /wp-admin/edit.php3.36 ▲0.0049.17 ▼3.91
Add New Post /wp-admin/post-new.php5.89 ▲0.0086.81 ▼9.46
Media Library /wp-admin/upload.php3.23 ▲0.0033.35 ▼5.25

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 708 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Mergado Pack
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲6814.35 ▼0.371.91 ▲0.2736.24 ▼0.48
Dashboard /wp-admin2,192 ▲145.51 ▼0.2289.50 ▼21.8539.45 ▼1.74
Posts /wp-admin/edit.php2,100 ▼02.02 ▲0.0138.95 ▼0.2734.34 ▼3.80
Add New Post /wp-admin/post-new.php1,526 ▼023.65 ▲0.80685.02 ▲3.7859.82 ▼0.52
Media Library /wp-admin/upload.php1,400 ▼04.19 ▼0.0894.29 ▼19.6940.08 ▼8.29

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 144× GET requests to PHP files return non-empty strings (only 10 are shown):
    • > /wp-content/plugins/mergado-marketing-pack/src/Service/External/Facebook/templates/search.php
    • > /wp-content/plugins/mergado-marketing-pack/src/Service/External/Biano/templates/addToCartAjax.php
    • > /wp-content/plugins/mergado-marketing-pack/trunk/src/Service/External/Heureka/templates/conversion.php
    • > /wp-content/plugins/mergado-marketing-pack/src/Service/External/Google/Gtag/templates/GA4/selectItem.php
    • > /wp-content/plugins/mergado-marketing-pack/trunk/src/Service/External/Google/GoogleAds/templates/conversion.php
    • > /wp-content/plugins/mergado-marketing-pack/trunk/src/Service/External/Google/Gtag/templates/GA4/viewCart.php
    • > /wp-content/plugins/mergado-marketing-pack/src/Service/External/Google/GoogleTagManager/templates/checkoutManipulation.php
    • > /wp-content/plugins/mergado-marketing-pack/trunk/src/Service/External/Google/Gtag/templates/Universal/purchased.php
    • > /wp-content/plugins/mergado-marketing-pack/src/Service/External/Glami/templates/pixel/init.php
    • > /wp-content/plugins/mergado-marketing-pack/trunk/src/Service/External/Zbozi/templates/conversion.php
  • 964× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Notice
      Undefined variable: consent in wp-content/plugins/mergado-marketing-pack/src/Service/External/Glami/templates/pixel/viewContentCategory.php on line 9
    • > PHP Notice
      Undefined variable: value in wp-content/plugins/mergado-marketing-pack/src/Service/External/Argep/templates/conversion.php on line 5
    • > PHP Notice
      Undefined variable: id in wp-content/plugins/mergado-marketing-pack/trunk/src/Service/External/Google/GoogleTagManager/templates/addToCart.php on line 10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/mergado-marketing-pack/admin/templates/partials/support/logs.php:5
    • > PHP Notice
      Undefined variable: productTitle in wp-content/plugins/mergado-marketing-pack/src/Service/External/Facebook/templates/viewContent.php on line 11
    • > PHP Fatal error
      Trait 'Mergado\\Traits\\SingletonTrait' not found in wp-content/plugins/mergado-marketing-pack/src/Service/CookieService.php on line 11
    • > PHP Notice
      Undefined variable: currency in wp-content/plugins/mergado-marketing-pack/trunk/src/Service/External/Google/Gtag/templates/Universal/selectContent.php on line 4
    • > PHP Notice
      Undefined variable: itemIds in wp-content/plugins/mergado-marketing-pack/src/Service/External/Glami/templates/pixel/viewContentCategory.php on line 5
    • > PHP Notice
      Undefined variable: categoryName in wp-content/plugins/mergado-marketing-pack/trunk/src/Service/External/Facebook/templates/viewCategory.php on line 3
    • > PHP Notice
      Undefined variable: contentIds in wp-content/plugins/mergado-marketing-pack/trunk/src/Service/External/Facebook/templates/initiateCheckout.php on line 4

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
5 plugin tags: export, xml, woocommerce, marketing, feed

mergado-marketing-pack/mergado-marketing-pack.php 92% from 13 tests

Analyzing the main PHP file in "Mergado Pack" version 3.7.1
Please take the time to fix the following:
  • Requires at least: The required version number must match the one declared in readme.txt ("4.5.1" instead of "3.0")

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
No dangerous file extensions were detected35,056 lines of code in 340 files:
LanguageFilesBlank linesComment linesLines of code
PHP2984,2924,03818,699
JSON50012,572
CSS7401402,220
JavaScript17168631,103
SVG1101407
Markdown113042
EJS10013

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity9.87
▷ Minimum class complexity1.00
▷ Maximum class complexity117.00
Average method complexity2.51
▷ Minimum method complexity1.00
▷ Maximum method complexity41.00
Code structure
Namespaces48
Interfaces4
Traits2
Classes320
▷ Abstract classes165.00%
▷ Concrete classes30495.00%
▷ Final classes00.00%
Methods1,926
▷ Static methods32416.82%
▷ Public methods1,75090.86%
▷ Protected methods763.95%
▷ Private methods1005.19%
Functions40
▷ Named functions1435.00%
▷ Anonymous functions2665.00%
Constants490
▷ Global constants306.12%
▷ Class constants46093.88%
▷ Public constants45298.26%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
8 PNG files occupy 0.08MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/img/rsz_mergado_pack_logo_menu.png0.64KB0.83KB0.00%
trunk/admin/img/mergado_pack_logo_menu.png1.70KB1.73KB0.00%
trunk/admin/img/mergado_logo.png36.70KB4.14KB▼ 88.72%
trunk/admin/img/rsz_mergado_pack_logo_menu.png0.64KB0.83KB0.00%
trunk/admin/img/logo.png2.33KB1.91KB▼ 18.09%