Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors
Server metrics [RAM: ▲0.05MB] [CPU: ▼5.24ms] Passed 4 tests
A check of server-side resources used by Commons In A Box
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.52 ▲0.06 | 36.39 ▼4.00 |
Dashboard /wp-admin | 3.35 ▲0.05 | 44.83 ▼9.73 |
Posts /wp-admin/edit.php | 3.41 ▲0.05 | 47.57 ▲1.88 |
Add New Post /wp-admin/post-new.php | 5.94 ▲0.05 | 84.43 ▼9.10 |
Media Library /wp-admin/upload.php | 3.28 ▲0.05 | 37.39 ▲3.41 |
Server storage [IO: ▲11.68MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 106 new files
Database: no new tables, 6 new options
New WordPress options |
---|
can_compress_scripts |
theysaidso_admin_options |
db_upgraded |
widget_theysaidso_widget |
widget_recent-posts |
widget_recent-comments |
Browser metrics Passed 4 tests
Checking browser requirements for Commons In A Box
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,829 ▲83 | 13.27 ▼1.10 | 4.32 ▲2.50 | 40.72 ▼2.16 |
Dashboard /wp-admin | 2,229 ▲44 | 5.84 ▼0.02 | 104.05 ▼0.82 | 38.32 ▼5.14 |
Posts /wp-admin/edit.php | 2,121 ▲35 | 2.00 ▼0.00 | 40.23 ▲3.70 | 39.94 ▲4.62 |
Add New Post /wp-admin/post-new.php | 1,563 ▲44 | 23.41 ▲0.27 | 640.46 ▼33.07 | 57.69 ▲7.33 |
Media Library /wp-admin/upload.php | 1,414 ▲26 | 4.31 ▲0.14 | 96.37 ▼6.58 | 46.37 ▲0.38 |
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
- This plugin did not uninstall successfully, leaving 6 options in the database
- can_compress_scripts
- widget_recent-comments
- db_upgraded
- widget_theysaidso_widget
- theysaidso_admin_options
- widget_recent-posts
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested
SRP 0% 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
- 1× PHP files output non-empty strings when accessed directly via GET requests:
- > /wp-content/plugins/commons-in-a-box/admin/templates/base/footer.php
- 44× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/commons-in-a-box/admin/templates/openlab/description.php:2
- > PHP Fatal error
Uncaught Error: Call to undefined function cbox_get_theme_prop() in wp-content/plugins/commons-in-a-box/admin/templates/base/package-details.php:2
- > PHP Fatal error
Uncaught Error: Call to undefined function cbox_welcome_panel_classes() in wp-content/plugins/commons-in-a-box/admin/templates/base/welcome.php:2
- > PHP Fatal error
Uncaught Error: Class 'CBox_Package' not found in wp-content/plugins/commons-in-a-box/includes/classic/classic.php:20
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/commons-in-a-box/includes/openlab/defaults/bbpress.php:16
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/commons-in-a-box/admin/templates/classic/package-details-plugins.php:2
- > PHP Fatal error
Uncaught Error: Call to undefined function cbox_get_package_prop() in wp-content/plugins/commons-in-a-box/admin/templates/base/package-details-intro.php:2
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/commons-in-a-box/admin/templates/base/package-details-theme.php:2
- > PHP Fatal error
Uncaught Error: Call to undefined function __() in wp-content/plugins/commons-in-a-box/languages/strings/openlab-theme.php:13
- > PHP Fatal error
Uncaught Error: Call to undefined function __() in wp-content/plugins/commons-in-a-box/admin/templates/base/package-details-plugins.php:2
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected
Optimizations
Plugin configuration 96% from 29 tests
readme.txt Passed 16 tests
It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
6 plugin tags: community, buddypress, education, academic, cuny...
commons-in-a-box/loader.php 92% from 13 tests
This is the main PHP file of "Commons In A Box" version 1.5.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
- Main file name: Please rename the main PHP file in this plugin to the plugin slug ("commons-in-a-box.php" instead of "loader.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected7,561 lines of code in 71 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 64 | 2,100 | 3,671 | 7,379 |
JavaScript | 1 | 10 | 0 | 51 |
CSS | 1 | 6 | 0 | 36 |
Bourne Again Shell | 1 | 11 | 30 | 28 |
Markdown | 2 | 22 | 0 | 27 |
PO File | 1 | 8 | 12 | 25 |
JSON | 1 | 0 | 0 | 15 |
PHP code Passed 2 tests
A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.24 |
Average class complexity | 25.44 |
▷ Minimum class complexity | 2.00 |
▷ Maximum class complexity | 136.00 |
Average method complexity | 3.77 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 33.00 |
Code structure | ||
---|---|---|
Namespaces | 3 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 32 | |
▷ Abstract classes | 2 | 6.25% |
▷ Concrete classes | 30 | 93.75% |
▷ Final classes | 0 | 0.00% |
Methods | 225 | |
▷ Static methods | 78 | 34.67% |
▷ Public methods | 171 | 76.00% |
▷ Protected methods | 30 | 13.33% |
▷ Private methods | 24 | 10.67% |
Functions | 105 | |
▷ Named functions | 37 | 35.24% |
▷ Anonymous functions | 68 | 64.76% |
Constants | 4 | |
▷ Global constants | 3 | 75.00% |
▷ Class constants | 1 | 25.00% |
▷ Public constants | 1 | 100.00% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
Using a strong compression for your PNG files is a great way to speed-up your plugin
13 PNG files occupy 1.00MB with 0.36MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
lib/wp-plugin-dependencies/screenshot-1.png | 4.97KB | 2.65KB | ▼ 46.75% |
admin/images/menu-2x.png | 2.36KB | 1.77KB | ▼ 25.19% |
admin/images/logo-cbox_icon-2x.png | 1.69KB | 1.02KB | ▼ 39.47% |
admin/images/menu.png | 1.08KB | 0.92KB | ▼ 14.07% |
lib/wp-plugin-dependencies/screenshot-2.png | 11.13KB | 4.75KB | ▼ 57.27% |