84% material-admin-theme

Code Review | Material Admin Theme

WordPress plugin Material Admin Theme scored84%from 54 tests.

About plugin

  • Plugin page: material-admin-theme
  • Plugin version: 1.3.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.5
  • WordPress version: 6.3.1
  • First release: Jul 26, 2015
  • Latest release: Apr 9, 2016
  • Number of updates: 33
  • Update frequency: every 7.8 days
  • Top authors: chmln (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

2,000+ active /21,846 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

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

This is a short check of server-side resources used by Material Admin Theme
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0039.24 ▼5.89
Dashboard /wp-admin3.31 ▼0.0452.18 ▼16.60
Posts /wp-admin/edit.php3.36 ▲0.0051.20 ▼1.11
Add New Post /wp-admin/post-new.php5.89 ▲0.0097.74 ▼13.59
Media Library /wp-admin/upload.php3.23 ▲0.0034.34 ▼0.71

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Material Admin Theme
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,786 ▲4014.24 ▲0.301.72 ▼0.0343.81 ▲3.13
Dashboard /wp-admin2,175 ▼55.58 ▼0.0982.39 ▼9.7340.26 ▼4.14
Posts /wp-admin/edit.php2,080 ▼202.02 ▲0.0340.12 ▲1.6638.19 ▲2.63
Add New Post /wp-admin/post-new.php1,528 ▼023.01 ▼0.21616.40 ▼49.2255.19 ▼0.87
Media Library /wp-admin/upload.php1,380 ▼204.19 ▲0.0398.43 ▼9.3145.46 ▼1.41

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
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts

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
Even though no errors were found, this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/material-admin-theme/material-admin-theme.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
You can take inspiration from this readme.txt

material-admin-theme/material-admin-theme.php Passed 13 tests

"Material Admin Theme" version 1.3.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
25 characters long description:
Clean, eye-pleasing theme

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin244 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
CSS1528205
SVG12332
PHP1497

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.00
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
6 PNG files occupy 0.53MB with 0.41MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-2.png84.06KB23.84KB▼ 71.64%
assets/screenshot-3.png21.24KB9.13KB▼ 57.00%
assets/icon-256x256.png259.01KB0.96KB▼ 99.63%
assets/icon-128x128.png66.85KB0.57KB▼ 99.15%
assets/banner-772x250.png30.19KB12.63KB▼ 58.17%