84% material-design-icons

Code Review | Material Design Icons

WordPress plugin Material Design Icons scored84%from 54 tests.

About plugin

  • Plugin page: material-design-i...
  • Plugin version: 0.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.3
  • WordPress version: 6.3.1
  • First release: Apr 16, 2015
  • Latest release: Aug 19, 2015
  • Number of updates: 26
  • Update frequency: every 4.8 days
  • Top authors: braginteractive (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

700+ active /10,151 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

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

Server-side resources used by Material Design Icons
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.86 ▼6.84
Dashboard /wp-admin3.31 ▲0.0145.73 ▼0.72
Posts /wp-admin/edit.php3.36 ▲0.0147.87 ▼12.44
Add New Post /wp-admin/post-new.php5.90 ▲0.0191.19 ▲2.06
Media Library /wp-admin/upload.php3.24 ▲0.0133.79 ▼0.02

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 25 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Material Design Icons
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲6613.68 ▼0.621.57 ▼0.2942.11 ▼1.24
Dashboard /wp-admin2,212 ▲215.84 ▼0.07106.72 ▼2.6842.51 ▼1.02
Posts /wp-admin/edit.php2,095 ▲62.00 ▼0.0339.05 ▼1.8838.53 ▲1.34
Add New Post /wp-admin/post-new.php1,529 ▼1318.18 ▼0.01610.30 ▲1.1665.82 ▲12.96
Media Library /wp-admin/upload.php1,394 ▲94.19 ▲0.0195.45 ▼8.6441.49 ▼3.57

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments

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

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/material-design-icons/plugin.php:55

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

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
6 plugin tags: ui, icons, material design, material, icon font...

material-design-icons/plugin.php 92% from 13 tests

The principal PHP file in "Material Design Icons" v. 0.0.5 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("material-design-icons.php" instead of "plugin.php")

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 plugin8,749 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
CSS41,175163,573
SVG1003,522
JavaScript11421,303
HTML1210131
JSON300112
PHP1223062
Sass52046

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity1.80
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods330.00%
▷ Public methods880.00%
▷ Protected methods110.00%
▷ Private methods110.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
css/mdi-icon.png2.91KB1.08KB▼ 62.84%