Benchmarks
Plugin footprint 48% 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: ▼1.31MB] [CPU: ▼38.93ms] Passed 4 tests
Server-side resources used by DTC Documents
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.66 ▼0.80 | 14.54 ▼23.81 |
Dashboard /wp-admin | 2.70 ▼0.60 | 19.82 ▼27.61 |
Posts /wp-admin/edit.php | 2.70 ▼0.65 | 18.46 ▼27.28 |
Add New Post /wp-admin/post-new.php | 2.70 ▼3.18 | 18.41 ▼77.00 |
Media Library /wp-admin/upload.php | 2.70 ▼0.52 | 16.79 ▼17.37 |
Mass Document Status /wp-admin/admin.php?page=dtc_mass_change_item_status | 2.70 | 17.21 |
All Documents /wp-admin/admin.php?page=dtc_display_all_documents | 2.70 | 18.51 |
Add New Document /wp-admin/admin.php?page=dtc_add_new_document | 2.70 | 16.40 |
Add New Category /wp-admin/admin.php?page=dtc_add_new_category | 2.70 | 18.34 |
DTC Documents /wp-admin/admin.php?page=dtc_document | 2.70 | 17.24 |
Document Status /wp-admin/admin.php?page=dtc_change_item_status | 2.70 | 17.46 |
All Categories /wp-admin/admin.php?page=dtc_all_categories | 2.70 | 16.92 |
Delete Topic /wp-admin/admin.php?page=dtc_delete_item | 2.70 | 18.05 |
Server storage [IO: ▲1.25MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 39 new files
Database: 2 new tables, 6 new options
New tables |
---|
wp_dtc_doc_categories |
wp_dtc_doc_documents |
New WordPress options |
---|
widget_recent-comments |
theysaidso_admin_options |
widget_theysaidso_widget |
db_upgraded |
widget_recent-posts |
can_compress_scripts |
Browser metrics Passed 4 tests
DTC Documents: an overview of browser usage
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,011 ▲276 | 14.81 ▲0.44 | 1.98 ▲0.16 | 38.79 ▼5.83 |
Dashboard /wp-admin | 2,391 ▲203 | 6.55 ▲1.67 | 135.81 ▲20.32 | 40.41 ▼6.47 |
Posts /wp-admin/edit.php | 2,305 ▲213 | 3.50 ▲1.48 | 55.28 ▲18.59 | 40.17 ▲3.96 |
Add New Post /wp-admin/post-new.php | 1,705 ▲191 | 22.20 ▲4.72 | 562.38 ▼125.65 | 32.52 ▼18.66 |
Media Library /wp-admin/upload.php | 1,441 ▲56 | 4.19 ▲0.06 | 82.82 ▼18.05 | 47.97 ▲3.34 |
Mass Document Status /wp-admin/admin.php?page=dtc_mass_change_item_status | 1,819 | 4.38 | 55.47 | 34.52 |
All Documents /wp-admin/admin.php?page=dtc_display_all_documents | 1,148 | 3.18 | 44.00 | 27.83 |
Add New Document /wp-admin/admin.php?page=dtc_add_new_document | 1,122 | 3.29 | 42.92 | 30.25 |
Add New Category /wp-admin/admin.php?page=dtc_add_new_category | 1,064 | 3.16 | 44.03 | 30.46 |
DTC Documents /wp-admin/admin.php?page=dtc_document | 1,012 | 3.19 | 41.39 | 61.50 |
Document Status /wp-admin/admin.php?page=dtc_change_item_status | 1,818 | 4.43 | 52.55 | 36.18 |
All Categories /wp-admin/admin.php?page=dtc_all_categories | 1,142 | 3.27 | 40.17 | 28.82 |
Delete Topic /wp-admin/admin.php?page=dtc_delete_item | 1,830 | 4.41 | 53.03 | 37.71 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 25% from 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
- The plugin did not uninstall gracefully
- > Notice in wp-content/plugins/dtc-documents/index.php+150
Constant DTC_DOC_PLUGIN_DIR already defined
- This plugin does not fully uninstall, leaving 2 tables in the database
- wp_dtc_doc_documents
- wp_dtc_doc_categories
- The uninstall procedure has failed, leaving 6 options in the database
- theysaidso_admin_options
- widget_recent-posts
- can_compress_scripts
- widget_recent-comments
- db_upgraded
- widget_theysaidso_widget
Smoke tests 25% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
- 11 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=dtc_delete_item
- > Notice in wp-content/plugins/dtc-documents/index.php+150
Constant DTC_DOC_PLUGIN_DIR already defined
- 3 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=dtc_delete_item
- > Notice in wp-content/plugins/dtc-documents/index.php+549
Undefined index: table
- 5 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=dtc_delete_item
- > Notice in wp-content/plugins/dtc-documents/index.php+552
Undefined index: id
- > GET request to /wp-admin/admin.php?page=dtc_mass_change_item_status
- > Warning in wp-content/plugins/dtc-documents/index.php+521
array_map(): Expected parameter 2 to be an array, null given
- > GET request to /wp-admin/admin.php?page=dtc_mass_change_item_status
- > Notice in wp-content/plugins/dtc-documents/index.php+522
Undefined index: action
- > GET request to /wp-admin/admin.php?page=dtc_mass_change_item_status
- > Warning in wp-content/plugins/dtc-documents/index.php+524
Invalid argument supplied for foreach()
- 7 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=dtc_delete_item
- > User notice in wp-includes/functions.php+5905
Function wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.)
- > GET request to /wp-admin/admin.php?page=dtc_display_all_documents
- > Warning in wp-content/plugins/dtc-documents/views/document-list.php+201
Division by zero
- > GET request to /wp-admin/admin.php?page=dtc_add_new_document
- > Notice in wp-content/plugins/dtc-documents/views/add_document.php+28
Undefined variable: documentRow
- > GET request to /wp-admin/admin.php?page=dtc_add_new_document
- > Notice in wp-content/plugins/dtc-documents/views/add_document.php+28
Trying to get property 'category_id' of non-object
- > GET request to /wp-admin/admin.php?page=dtc_change_item_status
- > Notice in wp-content/plugins/dtc-documents/index.php+486
Undefined index: value
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
Please fix the following
- 9× PHP files trigger server-side errors or warnings when accessed directly:
- > PHP Notice
Undefined variable: document in wp-content/plugins/dtc-documents/views/shortcode-recent-document-btn.php on line 3
- > PHP Fatal error
Uncaught Error: Call to undefined function get_admin_url() in wp-content/plugins/dtc-documents/views/add_category.php:3
- > PHP Fatal error
Uncaught Error: Call to undefined function get_admin_url() in wp-content/plugins/dtc-documents/views/add_document.php:3
- > PHP Fatal error
Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/dtc-documents/views/category-list.php:102
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/dtc-documents/views/shortcode-document-list.php:23
- > PHP Notice
Undefined variable: optionCSSStyles in wp-content/plugins/dtc-documents/views/shortcode-recent-document-btn.php on line 3
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/dtc-documents/views/index.php:6
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/dtc-documents/views/shortcode-recent-document-btn.php:4
- > PHP Fatal error
Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/dtc-documents/views/document-list.php:65
- > PHP Notice
User-side errors 0% from 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following browser errors
- 4 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=dtc_delete_item
- > Javascript (severe) in unknown
/wp-admin/admin.php?page=dtc_all_categories 242:30 Uncaught TypeError: Cannot set properties of null (setting 'checked')
- 4 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=dtc_delete_item
- > Javascript (severe) in unknown
/wp-admin/admin.php?page=dtc_all_categories 176:25 Uncaught TypeError: Cannot read properties of null (reading 'checked')
- > GET request to /wp-admin/admin.php?page=dtc_display_all_documents
- > Javascript (severe) in unknown
/wp-admin/admin.php?page=dtc_display_all_documents 206:30 Uncaught TypeError: Cannot set properties of null (setting 'checked')
- > GET request to /wp-admin/admin.php?page=dtc_display_all_documents
- > Javascript (severe) in unknown
/wp-admin/admin.php?page=dtc_display_all_documents 163:25 Uncaught TypeError: Cannot read properties of null (reading 'checked')
Optimizations
Plugin configuration 83% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
- Tags: There are too many tags (12 tag instead of maximum 10)
dtc-documents/index.php 69% from 13 tests
The principal PHP file in "DTC Documents" v. 1.1.05 is loaded by WordPress automatically on each request
Please take the time to fix the following:
- Main file name: It is recommended to name the main PHP file as the plugin slug ("dtc-documents.php" instead of "index.php")
- Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
- Domain Path: The domain path points to an invalid folder, "/languages" does not exist
- Description: Please keep the plugin description shorter than 140 characters (currently 513 characters long)
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin5,208 lines of code in 21 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
SVG | 2 | 1 | 0 | 2,681 |
PHP | 11 | 379 | 567 | 1,284 |
CSS | 4 | 225 | 174 | 1,170 |
JavaScript | 4 | 24 | 28 | 73 |
PHP code Passed 2 tests
An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.35 |
Average class complexity | 0.00 |
▷ Minimum class complexity | 0.00 |
▷ Maximum class complexity | 0.00 |
Average method complexity | 0.00 |
▷ Minimum method complexity | 0.00 |
▷ Maximum method complexity | 0.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 0 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 0 | 0.00% |
▷ Final classes | 0 | 0.00% |
Methods | 0 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 0 | 0.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 24 | |
▷ Named functions | 24 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 4 | |
▷ Global constants | 4 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
5 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
img/dtc-doc-icon.png | 11.76KB | 11.68KB | ▼ 0.69% |
style/css/icons/broken-image.png | 0.26KB | 0.17KB | ▼ 33.33% |
style/css/icons/icon-arrow-left.png | 1.45KB | 0.40KB | ▼ 72.16% |
style/css/icons/icon-close.png | 1.18KB | 0.43KB | ▼ 63.71% |
style/css/icons/icon-arrow-right.png | 1.46KB | 0.41KB | ▼ 72.00% |