79% materialis-companion

Code Review | Materialis Companion

WordPress plugin Materialis Companion scored79%from 54 tests.

About plugin

  • Plugin page: materialis-companion
  • Plugin version: 1.3.43
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.4
  • WordPress version: 6.3.1
  • First release: Jun 11, 2018
  • Latest release: Nov 6, 2023
  • Number of updates: 29
  • Update frequency: every 68.7 days
  • Top authors: horearadu (93.1%)extendthemes (10.34%)

Code review

54 tests

User reviews

10 reviews

Install metrics

10,000+ active /195,487 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.29MB] [CPU: ▼1.38ms] Passed 4 tests

This is a short check of server-side resources used by Materialis Companion
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.78 ▲0.3142.96 ▲5.14
Dashboard /wp-admin3.63 ▲0.3345.67 ▼3.07
Posts /wp-admin/edit.php3.68 ▲0.3347.23 ▼3.09
Add New Post /wp-admin/post-new.php6.15 ▲0.2680.54 ▼0.64
Media Library /wp-admin/upload.php3.49 ▲0.2637.46 ▲1.30

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 156 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Materialis Companion
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲2814.32 ▼0.401.98 ▲0.0143.42 ▼1.67
Dashboard /wp-admin2,198 ▲245.60 ▲0.0293.60 ▲2.6735.77 ▼3.20
Posts /wp-admin/edit.php2,097 ▼61.94 ▼0.0239.26 ▼2.3736.07 ▼2.00
Add New Post /wp-admin/post-new.php1,540 ▲525.05 ▲6.63611.94 ▼7.2166.18 ▲4.01
Media Library /wp-admin/upload.php1,403 ▲94.19 ▼0.0095.81 ▼5.1843.25 ▲1.49

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
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check 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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/materialis-companion/theme-data/materialis/integrations/gutenberg/integration.php
    • > /wp-content/plugins/materialis-companion/theme-data/materialis/integrations/index.php
  • 26× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Materialis\\Customizer\\Controls\\RowsListControl' not found in wp-content/plugins/materialis-companion/src/Customizer/Controls/ContentSectionsListControl.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Customize_Control' not found in wp-content/plugins/materialis-companion/src/Customizer/BaseControl.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Customize_Section' not found in wp-content/plugins/materialis-companion/src/Customizer/BaseSection.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Materialis\\Customizer\\BaseControl' not found in wp-content/plugins/materialis-companion/src/Customizer/Controls/ColorBoxesControl.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/materialis-companion/support/wp-5.8.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Materialis\\Customizer\\BaseControl' not found in wp-content/plugins/materialis-companion/src/Customizer/Controls/MultiImageControl.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Materialis\\Customizer\\BaseControl' not found in wp-content/plugins/materialis-companion/src/Customizer/Controls/BackroundTypesControl.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/materialis-companion/theme-data/materialis/updates.php:104
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/materialis-companion/theme-data/materialis/notifications.php:52
    • > PHP Fatal error
      Uncaught Error: Class 'Materialis\\Customizer\\BaseControl' not found in wp-content/plugins/materialis-companion/src/Customizer/Controls/RowsListControl.php:5

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

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
4 plugin tags: drop, drag, builder, materialis companion

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

"Materialis Companion" version 1.3.43's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
102 characters long description:
The Materialis Companion plugin adds drag and drop page builder functionality to the Materialis theme.

Code Analysis Passed 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 plugin27,092 lines of code in 96 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript343,37194913,772
PHP481,2932898,870
CSS108252494,310
HTML10076
JSON30064

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity17.40
▷ Minimum class complexity1.00
▷ Maximum class complexity172.00
Average method complexity3.10
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces10
Interfaces0
Traits0
Classes30
▷ Abstract classes00.00%
▷ Concrete classes30100.00%
▷ Final classes00.00%
Methods231
▷ Static methods5624.24%
▷ Public methods21492.64%
▷ Protected methods93.90%
▷ Private methods83.46%
Functions73
▷ Named functions3547.95%
▷ Anonymous functions3852.05%
Constants10
▷ Global constants550.00%
▷ Class constants550.00%
▷ Public constants5100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
31 compressed PNG files occupy 0.52MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
theme-data/materialis/sections/images/image-3.png69.46KB75.62KB0.00%
assets/images/up-down.png0.37KB0.34KB▼ 7.49%
assets/images/toolbar-cog.png1.00KB1.07KB0.00%
assets/images/trash-o.png0.36KB0.33KB▼ 7.88%
theme-data/materialis/sections/images/image-5.png77.65KB83.46KB0.00%