84% material-design

Code Review | Material Design for WordPress

WordPress plugin Material Design for WordPress scored84%from 54 tests.

About plugin

  • Plugin page: material-design
  • Plugin version: 0.7.0
  • PHP compatiblity: 5.6.20++
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9-6.0
  • WordPress version: 6.3.1
  • First release: Feb 11, 2021
  • Latest release: Dec 12, 2022
  • Number of updates: 26
  • Update frequency: every 30.0 days
  • Top authors: materialdesign (73.08%)xwp (30.77%)

Code review

54 tests

User reviews

7 reviews

Install metrics

1,000+ active /24,544 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
Install script ran successfully

Server metrics [RAM: ▲2.77MB] [CPU: ▲6.80ms] Passed 4 tests

This is a short check of server-side resources used by Material Design for WordPress
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /6.26 ▲2.8051.73 ▲11.80
Dashboard /wp-admin6.03 ▲2.6961.96 ▲2.84
Posts /wp-admin/edit.php6.15 ▲2.7957.01 ▲10.01
Add New Post /wp-admin/post-new.php9.04 ▲3.1598.70 ▲2.56
Media Library /wp-admin/upload.php6.03 ▲2.8047.22 ▲13.00
Settings /wp-admin/admin.php?page=material-settings-page6.0746.49
Getting Started /wp-admin/admin.php?page=material-settings6.0243.69
Onboarding Wizard /wp-admin/admin.php?page=material-onboarding-wizard6.0139.57

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 187 new files
Database: no new tables, 8 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
db_upgraded
material_m2_to_m3_migration
material_design
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Material Design for WordPress
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,891 ▲12018.47 ▲4.076.93 ▲5.1773.07 ▲32.10
Dashboard /wp-admin2,277 ▲1005.53 ▼0.1483.84 ▼4.2046.21 ▲6.42
Posts /wp-admin/edit.php2,188 ▲882.28 ▲0.3135.34 ▼0.4236.90 ▲2.62
Add New Post /wp-admin/post-new.php8,362 ▲6,82529.21 ▲11.02949.87 ▲308.8646.06 ▼8.81
Media Library /wp-admin/upload.php1,484 ▲874.33 ▲0.15100.64 ▼2.9047.79 ▲2.58
Settings /wp-admin/admin.php?page=material-settings-page1,0836.77152.5844.93
Getting Started /wp-admin/admin.php?page=material-settings9863.2751.1933.70
Onboarding Wizard /wp-admin/admin.php?page=material-onboarding-wizard8583.2249.6620.24

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The uninstall procedure has failed, leaving 8 options in the database
    • db_upgraded
    • material_m2_to_m3_migration
    • can_compress_scripts
    • material_design
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% 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 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 90× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/material-design/php/block-patterns/call-to-action-benefits.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'MaterialDesign\\Plugin\\Plugin_Base' not found in wp-content/plugins/material-design/php/class-plugin.php:40
    • > PHP Fatal error
      Uncaught Error: Class 'MaterialDesign\\Plugin\\Rest\\API_Base' not found in wp-content/plugins/material-design/php/rest/class-onboarding-rest-controller.php:33
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/material-design/php/template-parts/blocks/query-pagination.php on line 23
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/material-design/php/template-parts/blocks/query-pagination-next.php on line 22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_block_wrapper_attributes() in wp-content/plugins/material-design/php/template-parts/blocks/query-pagination.php:24
    • > PHP Notice
      Undefined variable: args in wp-content/plugins/material-design/php/template-parts/blocks/query-pagination-last.php on line 21
    • > PHP Notice
      Undefined variable: args in wp-content/plugins/material-design/php/template-parts/blocks/query-pagination-next.php on line 21
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_global_styles() on null in wp-content/plugins/material-design/php/template-parts/blocks/card-query.php:40
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Customize_Control' not found in wp-content/plugins/material-design/php/customizer/class-material-color-palette-control.php:33

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
8 plugin tags: blocks, google, gutenberg, material-design, dark-mode...

material-design/material-design.php 85% from 13 tests

The entry point to "Material Design for WordPress" version 0.7.0 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Requires PHP: Please use periods and digits for the required version (ex. "7.0" instead of "5.6.20+")
  • Description: Keep the plugin description shorter than 140 characters (currently 269 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin19,726 lines of code in 149 files:
LanguageFilesBlank linesComment linesLines of code
JSON210012,157
PHP871,4814,2376,511
XML282174902
JavaScript10103103
CSS170031
SVG120022

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity15.30
▷ Minimum class complexity1.00
▷ Maximum class complexity110.00
Average method complexity3.02
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces7
Interfaces0
Traits0
Classes40
▷ Abstract classes37.50%
▷ Concrete classes3792.50%
▷ Final classes00.00%
Methods282
▷ Static methods3612.77%
▷ Public methods27597.52%
▷ Protected methods31.06%
▷ Private methods41.42%
Functions17
▷ Named functions952.94%
▷ Anonymous functions847.06%
Constants18
▷ Global constants00.00%
▷ Class constants18100.00%
▷ Public constants18100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
19 PNG files occupy 0.44MB with 0.25MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/onboarding/apply-your-theme.png15.29KB4.45KB▼ 70.93%
assets/images/wizard/complete-build-with-blocks.png12.67KB3.65KB▼ 71.22%
assets/images/wizard/addon-quick-start-examples.png17.01KB4.97KB▼ 70.80%
assets/images/placeholder.png0.12KB0.12KB0.00%
assets/images/onboarding/build-with-material-blocks.png12.67KB3.65KB▼ 71.22%