77% materially-flat-admin-theme

Code Review | Materially Flat Admin Theme

WordPress plugin Materially Flat Admin Theme scored77%from 54 tests.

About plugin

  • Plugin page: materially-flat-a...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.5.3
  • WordPress version: 6.3.1
  • First release: Aug 3, 2016
  • Latest release: Aug 3, 2016
  • Number of updates: 4
  • Update frequency: every 2.3 days
  • Top authors: goodyduru (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,269 total downloads

Benchmarks

Plugin footprint 81% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.25MB] [CPU: ▼6.89ms] 50% from 4 tests

Server-side resources used by Materially Flat Admin Theme
Please fix the following
  • RAM: Try to keep total memory usage under 10MB (currently 12.24MB on /wp-admin/options.php?page=mfat-login)
  • CPU: You should keep total CPU usage under 500.00ms (currently 542.01ms on /wp-admin/options.php?page=mfat-login)
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0539.46 ▼1.26
Dashboard /wp-admin3.63 ▲0.2951.31 ▼19.42
Posts /wp-admin/edit.php3.74 ▲0.3948.08 ▼0.11
Add New Post /wp-admin/post-new.php6.23 ▲0.3490.63 ▼6.78
Media Library /wp-admin/upload.php3.55 ▲0.3239.59 ▲3.89
Materially Flat Admin Theme Login Settings /wp-admin/options.php?page=mfat-login12.24542.01
Settings /wp-admin/options.php?page=mfat-settings3.5734.45

Server storage [IO: ▲0.61MB] [DB: ▲0.00MB] 67% from 3 tests

Filesystem and database footprint
Please try to fix the following items
  • You have illegally modified 5 files (2.62KB) outside of "wp-content/plugins/materially-flat-admin-theme/" and "wp-content/uploads/"
    • (new file) wp-content/materially-flat-admin-theme/admin-variables.scss
    • (new file) wp-content/materially-flat-admin-theme/adminbar.scss
    • (new file) wp-content/materially-flat-admin-theme/login-variables.scss
    • (new file) wp-content/materially-flat-admin-theme/admin.scss
    • (new file) wp-content/materially-flat-admin-theme/login.scss
Filesystem: 99 new files
Database: no new tables, 9 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
mfat_theme_options
widget_recent-comments
mfat_settings_options
mfat_login_options

Browser metrics Passed 4 tests

Materially Flat Admin Theme: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,918 ▲17213.25 ▼0.955.49 ▲3.7339.91 ▼2.50
Dashboard /wp-admin2,267 ▲905.71 ▲0.1390.54 ▼2.1144.83 ▼0.35
Posts /wp-admin/edit.php2,278 ▲1782.24 ▲0.2142.17 ▲2.1637.56 ▼0.07
Add New Post /wp-admin/post-new.php1,550 ▲2223.18 ▲0.11706.58 ▲61.9140.31 ▼17.03
Media Library /wp-admin/upload.php1,402 ▲54.29 ▲0.09107.43 ▲3.5244.91 ▼2.44
Materially Flat Admin Theme Login Settings /wp-admin/options.php?page=mfat-login4,0703.8186.8140.44
Settings /wp-admin/options.php?page=mfat-settings9322.2328.3930.25

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 25× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'SassRenderer' not found in wp-content/plugins/materially-flat-admin-theme/inc/phpsass/renderers/SassCompressedRenderer.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'SassRenderer' not found in wp-content/plugins/materially-flat-admin-theme/inc/phpsass/renderers/SassCompressedRenderer.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'SassNode' not found in wp-content/plugins/materially-flat-admin-theme/inc/phpsass/tree/SassMixinNode.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'SassNode' not found in wp-content/plugins/materially-flat-admin-theme/inc/phpsass/tree/SassFunctionDefinitionNode.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'SassNode' not found in wp-content/plugins/materially-flat-admin-theme/inc/phpsass/tree/SassWarnNode.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'SassNode' not found in wp-content/plugins/materially-flat-admin-theme/inc/phpsass/tree/SassImportNode.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'SassIfNode' not found in wp-content/plugins/materially-flat-admin-theme/inc/phpsass/tree/SassElseNode.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'SassNode' not found in wp-content/plugins/materially-flat-admin-theme/inc/phpsass/tree/SassEachNode.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'SassNode' not found in wp-content/plugins/materially-flat-admin-theme/inc/phpsass/tree/SassExtendNode.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'SassNode' not found in wp-content/plugins/materially-flat-admin-theme/inc/phpsass/tree/SassRuleNode.php:18

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/options.php?page=mfat-settings
    • > Network (severe)
    wp-content/plugins/materially-flat-admin-theme/admin/js/admin-settings-min.js?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
  • Screenshots: Please a description for screenshot #2 in materially-flat-admin-theme/assets to your readme.txt
You can look at the official readme.txt

materially-flat-admin-theme/materially-flat-admin-theme.php Passed 13 tests

Analyzing the main PHP file in "Materially Flat Admin Theme" version 1.0.0
61 characters long description:
Change the look and appearance of your admin and login pages.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected15,263 lines of code in 94 files:
LanguageFilesBlank linesComment linesLines of code
PHP571,2144,0826,258
CSS215491895,241
JSON1002,741
JavaScript9165194939
Sass513073
Markdown16011

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity13.03
▷ Minimum class complexity1.00
▷ Maximum class complexity130.00
Average method complexity2.98
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes79
▷ Abstract classes11.27%
▷ Concrete classes7898.73%
▷ Final classes00.00%
Methods480
▷ Static methods9720.21%
▷ Public methods44893.33%
▷ Protected methods163.33%
▷ Private methods163.33%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants172
▷ Global constants63.49%
▷ Class constants16696.51%
▷ Public constants166100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin