Benchmarks
Plugin footprint 48% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully
Server metrics [RAM: ▲0.04MB] [CPU: ▼4.49ms] Passed 4 tests
Analyzing server-side resources used by CiviCRM Admin Utilities
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.51 ▲0.05 | 37.11 ▼5.22 |
Dashboard /wp-admin | 3.34 ▲0.04 | 45.45 ▼2.09 |
Posts /wp-admin/edit.php | 3.39 ▲0.04 | 49.31 ▲2.97 |
Add New Post /wp-admin/post-new.php | 5.92 ▲0.04 | 87.06 ▼9.61 |
Media Library /wp-admin/upload.php | 3.26 ▲0.04 | 35.19 ▼1.05 |
Server storage [IO: ▲1.25MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 83 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-comments |
theysaidso_admin_options |
db_upgraded |
widget_recent-posts |
can_compress_scripts |
widget_theysaidso_widget |
Browser metrics Passed 4 tests
A check of browser resources used by CiviCRM Admin Utilities
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,800 ▲65 | 13.24 ▼1.14 | 1.64 ▼0.32 | 43.72 ▼2.41 |
Dashboard /wp-admin | 2,206 ▲18 | 5.82 ▲0.01 | 103.87 ▼0.13 | 38.98 ▼2.76 |
Posts /wp-admin/edit.php | 2,089 ▼3 | 2.03 ▼0.02 | 34.07 ▼2.76 | 33.85 ▼0.71 |
Add New Post /wp-admin/post-new.php | 1,537 ▲4 | 23.17 ▲0.21 | 679.42 ▲4.67 | 55.35 ▲4.89 |
Media Library /wp-admin/upload.php | 1,388 ▼3 | 4.25 ▲0.05 | 95.57 ▼4.41 | 41.63 ▼4.67 |
Uninstaller [IO: ▲1.25MB] [DB: ▲0.00MB] 25% 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 followingThis plugin does not fully uninstall, leaving 7 options in the database
- This plugin cannot be uninstalled
- > Error in wp-content/plugins/civicrm-admin-utilities/civicrm-admin-utilities.php+269
Uncaught Error: Call to a member function deactivate_theme() on null in wp-content/plugins/civicrm-admin-utilities/civicrm-admin-utilities.php:269
Stack trace:
#0 wp-includes/class-wp-hook.php(310): CiviCRM_Admin_Utilities->deactivate()
#1 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
#2 wp-includes/plugin.php(517): WP_Hook->do_action()
#3 wp-admin/includes/plugin.php(816): do_action() - Incomplete uninstall procedure, leaving 83 files (1.25MB) in the plugin directory
- (new file) assets/civicrm/template-menu/.editorconfig
- (new file) assets/css/civicrm-admin-utilities-admin-5-3-plus.css
- (new file) assets/civicrm/template-access/CRM/ACL/Form/WordPress/Permissions.tpl
- (new file) assets/civicrm/template-nav/.editorconfig
- (new file) assets/civicrm/template-menu/CRM/common/navigation.js.tpl
- (new file) assets/civicrm/cautheme/civicrm-admin-utilities-resolver.php
- (new file) assets/civicrm/template-access/.editorconfig
- (new file) assets/civicrm/cautheme/civicrm-admin-utilities-theme.php
- (new file) assets/civicrm/template-nav/CRM/common/navigation.js.tpl
- (new file) assets/civicrm/.editorconfig
- ...
- theysaidso_admin_options
- can_compress_scripts
- widget_recent-posts
- widget_theysaidso_widget
- recovery_mode_email_last_sent
- db_upgraded
- 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
Everything seems fine, however this is by no means an exhaustive test
SRP 50% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
- 1× PHP files trigger errors when accessed directly with GET requests:
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/civicrm-admin-utilities/assets/templates/metaboxes/site-metabox-access-form.php:2
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: civicrm, utility, menu, styling, admin
civicrm-admin-utilities/civicrm-admin-utilities.php Passed 13 tests
"CiviCRM Admin Utilities" version 1.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
93 characters long description:
Optionally modifies CiviCRM's behaviour and appearance in single site and multisite installs.
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin13,961 lines of code in 58 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
CSS | 11 | 1,347 | 649 | 7,717 |
PHP | 38 | 2,388 | 4,548 | 5,124 |
JavaScript | 5 | 190 | 208 | 641 |
Smarty | 3 | 21 | 74 | 413 |
HTML | 1 | 4 | 5 | 66 |
PHP code Passed 2 tests
An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.38 |
Average class complexity | 75.22 |
▷ Minimum class complexity | 4.00 |
▷ Maximum class complexity | 244.00 |
Average method complexity | 3.27 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 29.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 9 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 9 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 266 | |
▷ Static methods | 1 | 0.38% |
▷ Public methods | 266 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 4 | |
▷ Named functions | 2 | 50.00% |
▷ Anonymous functions | 2 | 50.00% |
Constants | 5 | |
▷ Global constants | 5 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
4 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/images/civicrm-legacy/stop-icon.png | 0.58KB | 0.46KB | ▼ 20.00% |
assets/images/civicrm-legacy/contribute/cut_line.png | 5.23KB | 1.81KB | ▼ 65.45% |
assets/js/twentytwenty/img/after.png | 3.12KB | 0.34KB | ▼ 89.24% |
assets/js/twentytwenty/img/before.png | 3.23KB | 0.39KB | ▼ 87.91% |