Benchmarks
Plugin footprint 82% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully
Server metrics [RAM: ▲1.39MB] [CPU: ▲3.63ms] 75% from 4 tests
Analyzing server-side resources used by CM Download and File Manager
The following require your attention
- CPU: Total CPU usage should be kept under 500.00ms (currently 881.62ms on /wp-admin/admin.php?page=CMDM_admin_settings)
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 4.93 ▲1.46 | 53.87 ▲18.01 |
Dashboard /wp-admin | 4.74 ▲1.39 | 52.63 ▼3.55 |
Posts /wp-admin/edit.php | 4.81 ▲1.45 | 55.14 ▲3.27 |
Add New Post /wp-admin/post-new.php | 7.26 ▲1.37 | 101.64 ▼1.79 |
Media Library /wp-admin/upload.php | 4.60 ▲1.37 | 52.06 ▲16.58 |
Upgrade ➤ /wp-admin/admin.php?page=cmdm_pro | 4.65 | 44.36 |
Categories /wp-admin/edit-tags.php?taxonomy=cmdm_category&post_type=cmdm_page | 4.61 | 42.83 |
CM Downloads /wp-admin/edit.php?post_type=cmdm_page | 4.73 | 45.57 |
User Guide /wp-admin/admin.php?page=cmdm_about | 4.78 | 427.10 |
Add New /wp-admin/post-new.php?post_type=cmdm_page | 4.45 | 51.80 |
Settings /wp-admin/admin.php?page=CMDM_admin_settings | 4.83 | 881.62 |
Server storage [IO: ▲1.83MB] [DB: ▲0.01MB] Passed 3 tests
Filesystem and database footprint
This plugin installed successfully
Filesystem: 197 new files
Database: no new tables, 8 new options
New WordPress options |
---|
widget_theysaidso_widget |
cmdm_category_children |
widget_recent-comments |
theysaidso_admin_options |
CMDM_afterActivation |
db_upgraded |
can_compress_scripts |
widget_recent-posts |
Browser metrics Passed 4 tests
An overview of browser requirements for CM Download and File Manager
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,841 ▲80 | 14.35 ▼0.01 | 1.71 ▲0.15 | 39.92 ▼1.17 |
Dashboard /wp-admin | 2,245 ▲68 | 5.61 ▲0.00 | 83.15 ▼1.97 | 39.46 ▼3.01 |
Posts /wp-admin/edit.php | 2,147 ▲47 | 2.02 ▲0.03 | 39.27 ▲1.79 | 35.94 ▲2.62 |
Add New Post /wp-admin/post-new.php | 1,565 ▲39 | 23.20 ▼0.29 | 681.61 ▲23.89 | 75.25 ▲19.64 |
Media Library /wp-admin/upload.php | 1,447 ▲47 | 4.29 ▲0.02 | 105.98 ▲2.98 | 51.04 ▲6.47 |
Upgrade ➤ /wp-admin/admin.php?page=cmdm_pro | 2,236 | 2.29 | 41.21 | 95.54 |
Categories /wp-admin/edit-tags.php?taxonomy=cmdm_category&post_type=cmdm_page | 1,467 | 2.14 | 26.85 | 29.64 |
CM Downloads /wp-admin/edit.php?post_type=cmdm_page | 1,194 | 2.01 | 30.96 | 32.63 |
User Guide /wp-admin/admin.php?page=cmdm_about | 4,207 | 22.17 | 421.98 | 197.41 |
Add New /wp-admin/post-new.php?post_type=cmdm_page | 26 | 0.42 | 0.06 | 8.01 |
Settings /wp-admin/admin.php?page=CMDM_admin_settings | 2,654 | 7.68 | 72.60 | 61.65 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.01MB] 75% from 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
- The uninstall procedure has failed, leaving 8 options in the database
- widget_recent-posts
- cmdm_category_children
- db_upgraded
- CMDM_afterActivation
- theysaidso_admin_options
- widget_theysaidso_widget
- widget_recent-comments
- can_compress_scripts
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected
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
- 101× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
- > PHP Warning
Use of undefined constant CMDM_PATH - assumed 'CMDM_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/cm-download-manager/lib/helpers/Form/Element/Text.php on line 3
- > PHP Fatal error
Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/cm-download-manager/cm-download-manager.php:25
- > PHP Fatal error
require_once(): Failed opening required 'CMDM_PATH/lib/helpers/Form/Element.php' (include_path='.:/usr/share/php') in wp-content/plugins/cm-download-manager/lib/helpers/Form/Element/WpUploader.php on line 2
- > PHP Warning
include_once(CMDM_PATH/lib/models/PostType.php): failed to open stream: No such file or directory in wp-content/plugins/cm-download-manager/lib/models/GroupDownloadPage.php on line 2
- > PHP Fatal error
require_once(): Failed opening required 'CMDM_PATH/lib/helpers/Form/Element/Combobox.php' (include_path='.:/usr/share/php') in wp-content/plugins/cm-download-manager/lib/helpers/Form/Element/Radio.php on line 3
- > PHP Fatal error
Uncaught Error: Class 'CMDM_BaseController' not found in wp-content/plugins/cm-download-manager/lib/controllers/ErrorController.php:4
- > PHP Fatal error
require_once(): Failed opening required 'CMDM_PATH/lib/helpers/Form/Element.php' (include_path='.:/usr/share/php') in wp-content/plugins/cm-download-manager/lib/helpers/Form/Element/Visual.php on line 4
- > PHP Warning
Use of undefined constant CMDM_PATH - assumed 'CMDM_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/cm-download-manager/lib/helpers/Validate/Alnum.php on line 4
- > PHP Fatal error
require_once(): Failed opening required 'CMDM_PATH/lib/helpers/Validate/Interface.php' (include_path='.:/usr/share/php') in wp-content/plugins/cm-download-manager/lib/helpers/Validate/Url.php on line 4
- > PHP Warning
include_once(): Failed opening 'CMDM_PATH/lib/helpers/Form/Element.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/cm-download-manager/lib/helpers/Form.php on line 3
- > PHP Warning
User-side errors 0% from 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following browser errors
- > GET request to /wp-admin/admin.php?page=cmdm_about
- > Security (warning) in unknown
security - Error with Permissions-Policy header: Unrecognized feature: 'ambient-light-sensor'.
- > GET request to /wp-admin/admin.php?page=cmdm_about
- > Security (warning) in unknown
security - Error with Permissions-Policy header: Unrecognized feature: 'bluetooth'.
- > GET request to /wp-admin/admin.php?page=cmdm_about
- > Deprecation (warning) in unknown
https://static.xx.fbcdn.net/rsrc.php/v3/yQ/r/bnRvNSHX7Ev.js?_nc_x=Ij3Wp8lg5Kz 275 Listener added for a synchronous 'DOMSubtreeModified' DOM Mutation Event. This event type is deprecated (https://w3c.github.io/uievents/#legacy-event-types) and work is underway to remove it from this browser. Usage of this event listener will cause performance issues today, and represents a risk of future incompatibility. Consider using MutationObserver instead.
- > GET request to /wp-admin/admin.php?page=cmdm_about
- > Console-api (severe) in unknown
https://static.xx.fbcdn.net/rsrc.php/v3/yQ/r/bnRvNSHX7Ev.js?_nc_x=Ij3Wp8lg5Kz 60:573 "ErrorUtils caught an error:\n\nCannot listen to an undefined element. [Caught in: Tried to listen to element of type click]\n\nSubsequent non-fatal errors won't be logged; see https://fburl.com/debugjs."
- > GET request to /wp-admin/post-new.php?post_type=cmdm_page
- > Network (severe)
cmdownload/add - Failed to load resource: the server responded with a status of 404 (Not Found)
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: downloads, document management, download manager, file manager plugin, file manager
cm-download-manager/cm-download-manager.php Passed 13 tests
"CM Download and File Manager" version 2.8.10's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
131 characters long description:
Allow users to upload, manage, track and support documents or files in a directory listing structure for others to use and comment.
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin12,719 lines of code in 97 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 72 | 1,316 | 713 | 9,797 |
PO File | 5 | 525 | 895 | 1,374 |
CSS | 9 | 167 | 24 | 1,268 |
JavaScript | 9 | 36 | 33 | 259 |
SVG | 1 | 1 | 0 | 13 |
Ruby | 1 | 2 | 0 | 8 |
PHP code Passed 2 tests
Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.33 |
Average class complexity | 24.70 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 254.00 |
Average method complexity | 2.92 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 38.00 |
Code structure | ||
---|---|---|
Namespaces | 1 | |
Interfaces | 2 | |
Traits | 0 | |
Classes | 35 | |
▷ Abstract classes | 2 | 5.71% |
▷ Concrete classes | 33 | 94.29% |
▷ Final classes | 0 | 0.00% |
Methods | 452 | |
▷ Static methods | 164 | 36.28% |
▷ Public methods | 385 | 85.18% |
▷ Protected methods | 62 | 13.72% |
▷ Private methods | 5 | 1.11% |
Functions | 13 | |
▷ Named functions | 7 | 53.85% |
▷ Anonymous functions | 6 | 46.15% |
Constants | 64 | |
▷ Global constants | 8 | 12.50% |
▷ Class constants | 56 | 87.50% |
▷ Public constants | 56 | 100.00% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
75 PNG files occupy 0.98MB with 0.53MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
package/views/searchreplace.png | 37.22KB | 10.60KB | ▼ 71.53% |
views/resources/imgs/roundedGrey225x69.png | 1.25KB | 0.26KB | ▼ 79.28% |
package/css/images/ui-icons_2e83ff_256x240.png | 4.44KB | 4.17KB | ▼ 6.02% |
views/resources/imgs/694GreyCorners.png | 1.18KB | 0.28KB | ▼ 76.55% |
views/resources/imgs/icon-2.png | 2.63KB | 1.66KB | ▼ 36.98% |