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.10MB] [CPU: ▼7.10ms] Passed 4 tests
Analyzing server-side resources used by WP API SwaggerUI
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.56 ▲0.10 | 37.86 ▼6.73 |
Dashboard /wp-admin | 3.40 ▲0.10 | 48.10 ▼0.65 |
Posts /wp-admin/edit.php | 3.52 ▲0.16 | 48.29 ▼1.33 |
Add New Post /wp-admin/post-new.php | 5.98 ▲0.10 | 86.23 ▼19.68 |
Media Library /wp-admin/upload.php | 3.33 ▲0.10 | 39.82 ▲4.10 |
Swagger /wp-admin/options-general.php?page=swagger-ui | 4.43 | 37.78 |
Server storage [IO: ▲1.54MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-comments |
db_upgraded |
widget_recent-posts |
theysaidso_admin_options |
widget_theysaidso_widget |
can_compress_scripts |
Browser metrics Passed 4 tests
This is an overview of browser requirements for WP API SwaggerUI
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,818 ▲57 | 14.28 ▼0.01 | 1.77 ▼0.68 | 41.06 ▼4.99 |
Dashboard /wp-admin | 2,199 ▲34 | 5.66 ▲0.08 | 99.12 ▲9.00 | 42.32 ▼5.20 |
Posts /wp-admin/edit.php | 2,104 ▲1 | 2.03 ▲0.05 | 39.94 ▼0.95 | 34.78 ▼5.85 |
Add New Post /wp-admin/post-new.php | 1,531 ▼4 | 22.97 ▲4.67 | 638.22 ▲17.53 | 57.49 ▼27.95 |
Media Library /wp-admin/upload.php | 1,404 ▲4 | 4.18 ▼0.01 | 98.20 ▼11.14 | 46.20 ▼0.94 |
Swagger /wp-admin/options-general.php?page=swagger-ui | 835 | 2.14 | 23.38 | 26.22 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
- The uninstall procedure has failed, leaving 6 options in the database
- widget_recent-comments
- can_compress_scripts
- widget_theysaidso_widget
- theysaidso_admin_options
- db_upgraded
- widget_recent-posts
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, 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
The following issues need your attention
- 7× PHP files trigger server errors when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/wp-api-swaggerui/template/notice.php:2
- > PHP Notice
Undefined variable: page_title in wp-content/plugins/wp-api-swaggerui/template/setting.php on line 2
- > PHP Fatal error
Uncaught Error: Call to undefined function language_attributes() in wp-content/plugins/wp-api-swaggerui/template/single.php:2
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-api-swaggerui/swaggertemplate.php:78
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-api-swaggerui/swaggersetting.php:52
- > PHP Fatal error
Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wp-api-swaggerui/swaggerauth.php:96
- > PHP Fatal error
Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/wp-api-swaggerui/template/setting.php:4
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
10 plugin tags: wp swagger, swaggerui, swaggerui rest api, wp swaggerui, wp rest api...
wp-api-swaggerui/wp-api-swaggerui.php Passed 13 tests
The main PHP file in "WP API SwaggerUI" ver. 1.1.2 adds more information about the plugin and also serves as the entry point for this plugin
35 characters long description:
WordPress REST API with Swagger UI.
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected607 lines of code in 12 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 10 | 154 | 31 | 603 |
CSS | 1 | 0 | 0 | 3 |
JavaScript | 1 | 0 | 0 | 1 |
PHP code Passed 2 tests
Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.41 |
Average class complexity | 18.60 |
▷ Minimum class complexity | 5.00 |
▷ Maximum class complexity | 59.00 |
Average method complexity | 2.58 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 17.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 5 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 5 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 48 | |
▷ Static methods | 7 | 14.58% |
▷ Public methods | 47 | 97.92% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 1 | 2.08% |
Functions | 3 | |
▷ Named functions | 0 | 0.00% |
▷ Anonymous functions | 3 | 100.00% |
Constants | 0 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin