79% mesmerize-companion

Code Review | Mesmerize Companion

WordPress plugin Mesmerize Companion scored79%from 54 tests.

About plugin

  • Plugin page: mesmerize-companion
  • Plugin version: 1.6.147
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.4
  • WordPress version: 6.3.1
  • First release: Nov 2, 2017
  • Latest release: Nov 6, 2023
  • Number of updates: 53
  • Update frequency: every 41.6 days
  • Top authors: horearadu (96.23%)extendthemes (5.66%)

Code review

54 tests

User reviews

51 reviews

Install metrics

90,000+ active /1,720,155 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

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

Analyzing server-side resources used by Mesmerize Companion
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0236.51 ▼3.04
Dashboard /wp-admin3.31 ▲0.0145.34 ▼4.88
Posts /wp-admin/edit.php3.37 ▲0.0149.59 ▲5.20
Add New Post /wp-admin/post-new.php5.90 ▲0.0185.06 ▼15.45
Media Library /wp-admin/upload.php3.24 ▲0.0134.04 ▼1.45

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 156 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

Mesmerize Companion: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲4314.27 ▼0.011.52 ▼0.1437.25 ▼6.62
Dashboard /wp-admin2,195 ▲145.62 ▼0.0984.34 ▼33.6236.97 ▼9.39
Posts /wp-admin/edit.php2,100 ▼02.01 ▼0.0138.98 ▲3.3736.56 ▲3.07
Add New Post /wp-admin/post-new.php1,526 ▼923.10 ▼1.81690.85 ▼1.2253.14 ▼7.61
Media Library /wp-admin/upload.php1,394 ▼34.18 ▼0.02100.52 ▲1.8643.70 ▼0.83

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

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 take a closer look at the following
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/mesmerize-companion/theme-data/mesmerize/integrations/index.php
    • > /wp-content/plugins/mesmerize-companion/theme-data/mesmerize/integrations/demo-imports/integration.php
  • 37× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Customize_Control' not found in wp-content/plugins/mesmerize-companion/src/Customizer/BaseControl.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Mesmerize\\Companion_Plugin' not found in wp-content/plugins/mesmerize-companion/theme-data/mesmerize/integrations/demo-imports/views/ocdi-installer.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Mesmerize\\Customizer\\BaseSetting' not found in wp-content/plugins/mesmerize-companion/src/Customizer/Settings/ObjectSetting.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Mesmerize\\Customizer\\BaseSetting' not found in wp-content/plugins/mesmerize-companion/src/Customizer/Settings/ContentSetting.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/mesmerize-companion/theme-data/mesmerize/integrations/demo-imports/views/demo-install-popup.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mesmerize-companion/support/wp-5.8.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/mesmerize-companion/theme-data/mesmerize/integrations/demo-imports/views/pro-only-popup.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Mesmerize\\Customizer\\Controls\\RowsListControl' not found in wp-content/plugins/mesmerize-companion/src/Customizer/Controls/ContentSectionsListControl.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function OCDI\\wp_enqueue_script() in wp-content/plugins/mesmerize-companion/theme-data/mesmerize/integrations/demo-imports/views/demo-list.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Mesmerize\\Customizer\\BasePanel' not found in wp-content/plugins/mesmerize-companion/src/Customizer/Panels/HeaderPanel.php:5

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
4 plugin tags: drop, builder, drag, mesmerize companion

mesmerize-companion/mesmerize-companion.php Passed 13 tests

The primary PHP file in "Mesmerize Companion" version 1.6.147 is used by WordPress to initiate all plugin functionality
100 characters long description:
The Mesmerize Companion plugin adds drag and drop page builder functionality to the Mesmerize theme.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected31,007 lines of code in 113 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript363,3031,05815,361
PHP611,72029710,333
CSS149972565,236
HTML10076
JSON1001

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity20.03
▷ Minimum class complexity1.00
▷ Maximum class complexity200.00
Average method complexity3.22
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces12
Interfaces0
Traits0
Classes33
▷ Abstract classes00.00%
▷ Concrete classes33100.00%
▷ Final classes00.00%
Methods275
▷ Static methods8731.64%
▷ Public methods25592.73%
▷ Protected methods93.27%
▷ Private methods114.00%
Functions103
▷ Named functions4644.66%
▷ Anonymous functions5755.34%
Constants12
▷ Global constants758.33%
▷ Class constants541.67%
▷ Public constants5100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
20 PNG files occupy 0.02MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/cog-white.png0.46KB0.41KB▼ 11.68%
assets/images/swap.png0.33KB0.38KB0.00%
assets/images/slash.png0.21KB0.12KB▼ 43.13%
assets/images/toggle-menu.png0.18KB0.10KB▼ 41.76%
assets/images/trash.png0.29KB0.31KB0.00%