Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully
Server metrics [RAM: ▲0.60MB] [CPU: ▼7.25ms] Passed 4 tests
This is a short check of server-side resources used by WP OpenAPI
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.49 ▲0.03 | 33.11 ▼6.93 |
Dashboard /wp-admin | 4.47 ▲1.17 | 48.47 ▼0.00 |
Posts /wp-admin/edit.php | 4.59 ▲1.24 | 45.31 ▼0.26 |
Add New Post /wp-admin/post-new.php | 5.92 ▲0.04 | 78.85 ▼19.60 |
Media Library /wp-admin/upload.php | 4.40 ▲1.17 | 38.29 ▼2.19 |
wp/v2 /wp-admin/admin.php?page=wp-openapi/wp/v2 | 4.39 | 36.34 |
wp-block-editor/v1 /wp-admin/admin.php?page=wp-openapi/wp-block-editor/v1 | 4.37 | 34.47 |
wp-site-health/v1 /wp-admin/admin.php?page=wp-openapi/wp-site-health/v1 | 4.37 | 31.88 |
oembed/1.0 /wp-admin/admin.php?page=wp-openapi/oembed/1.0 | 4.37 | 33.62 |
All /wp-admin/admin.php?page=wp-openapi | 4.37 | 32.51 |
WP OpenAPI /wp-admin/options-general.php?page=wp-openapi-settings | 4.42 | 45.85 |
Server storage [IO: ▲4.50MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 51 new files
Database: no new tables, 7 new options
New WordPress options |
---|
wp-openapi-rewrite-flushed |
widget_recent-posts |
widget_theysaidso_widget |
db_upgraded |
can_compress_scripts |
theysaidso_admin_options |
widget_recent-comments |
Browser metrics Passed 4 tests
This is an overview of browser requirements for WP OpenAPI
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,891 ▲145 | 13.60 ▼0.75 | 1.93 ▲0.14 | 40.43 ▼2.32 |
Dashboard /wp-admin | 2,269 ▲81 | 5.97 ▲1.07 | 95.68 ▼11.28 | 36.16 ▲0.44 |
Posts /wp-admin/edit.php | 2,155 ▲63 | 2.05 ▲0.05 | 35.98 ▼1.97 | 33.16 ▼7.69 |
Add New Post /wp-admin/post-new.php | 1,548 ▲29 | 17.42 ▼5.74 | 679.77 ▲100.97 | 57.85 ▲8.53 |
Media Library /wp-admin/upload.php | 1,458 ▲70 | 4.26 ▲0.10 | 110.07 ▲12.50 | 48.22 ▲2.16 |
wp/v2 /wp-admin/admin.php?page=wp-openapi/wp/v2 | 970 | 7.25 | 233.24 | 57.47 |
wp-block-editor/v1 /wp-admin/admin.php?page=wp-openapi/wp-block-editor/v1 | 970 | 7.20 | 215.64 | 26.59 |
wp-site-health/v1 /wp-admin/admin.php?page=wp-openapi/wp-site-health/v1 | 973 | 7.10 | 96.51 | 28.59 |
oembed/1.0 /wp-admin/admin.php?page=wp-openapi/oembed/1.0 | 974 | 7.12 | 95.15 | 23.49 |
All /wp-admin/admin.php?page=wp-openapi | 1,079 | 7.14 | 94.28 | 33.95 |
WP OpenAPI /wp-admin/options-general.php?page=wp-openapi-settings | 857 | 2.07 | 28.33 | 35.43 |
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
Please fix the following items
- Zombie WordPress options were found after uninstall: 7 options
- db_upgraded
- can_compress_scripts
- wp-openapi-rewrite-flushed
- widget_recent-posts
- theysaidso_admin_options
- widget_recent-comments
- widget_theysaidso_widget
Smoke tests 25% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test
SRP 0% 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
Please fix the following items
- 3× PHP files perform the task of outputting text when accessed with GET requests:
- > /wp-content/plugins/wp-openapi/resources/views/settings-tryit.php
- > /wp-content/plugins/wp-openapi/resources/views/settings-discovery.php
- > /wp-content/plugins/wp-openapi/resources/views/callback.php
- 8× PHP files trigger server-side errors or warnings when accessed directly:
- > PHP Notice
Undefined variable: callbackType in wp-content/plugins/wp-openapi/resources/views/callback.php on line 6
- > PHP Notice
Undefined variable: checked in wp-content/plugins/wp-openapi/resources/views/settings-tryit.php on line 1
- > PHP Notice
Undefined variable: checked in wp-content/plugins/wp-openapi/resources/views/settings-discovery.php on line 1
- > PHP Fatal error
Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/wp-openapi/resources/views/settings.php:4
- > PHP Notice
Undefined variable: filepath in wp-content/plugins/wp-openapi/resources/views/callback.php on line 13
- > PHP Notice
Undefined variable: callbackType in wp-content/plugins/wp-openapi/resources/views/callback.php on line 3
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/wp-openapi/resources/views/export-html.php:6
- > PHP Fatal error
Uncaught Error: Call to undefined function WPOpenAPI\\add_action() in wp-content/plugins/wp-openapi/src/SettingsPage.php:52
- > 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 user-side errors
- > GET request to /wp-admin/admin.php?page=wp-openapi/wp/v2
- > Network (severe)
wp-json-openapi?namespace=wp/v2 - Failed to load resource: the server responded with a status of 404 (Not Found)
- 5 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=wp-openapi
- > Console-api (severe) in unknown
/wp-content/plugins/wp-openapi/build/resources/scripts/app.js?ver=822a94ad9fbac7b8e86be5dd14c15446 0:539914 Error: Unable to load description document, status code: 404at /wp-content/plugins/wp-openapi/build/resources/scripts/app.js?ver=822a94ad9fbac7b8e86be5dd14c15446:1:1906444
- > GET request to /wp-admin/admin.php?page=wp-openapi/wp-block-editor/v1
- > Network (severe)
wp-json-openapi?namespace=wp-block-editor/v1 - Failed to load resource: the server responded with a status of 404 (Not Found)
- > GET request to /wp-admin/admin.php?page=wp-openapi/wp-site-health/v1
- > Network (severe)
wp-json-openapi?namespace=wp-site-health/v1 - Failed to load resource: the server responded with a status of 404 (Not Found)
- > GET request to /wp-admin/admin.php?page=wp-openapi/oembed/1.0
- > Network (severe)
wp-json-openapi?namespace=oembed/1.0 - Failed to load resource: the server responded with a status of 404 (Not Found)
- > GET request to /wp-admin/admin.php?page=wp-openapi
- > Network (severe)
wp-json-openapi?namespace=all - 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
The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
5 plugin tags: swagger, rest api, documentation, api, openapi
wp-openapi/wp-openapi.php Passed 13 tests
The main file in "WP OpenAPI" v. 1.0.10 serves as a complement to information provided in readme.txt and as the entry point to the plugin
93 characters long description:
WP OpenAPI outputs the OpenAPI 3.1.0 spec and provides a viewer for your WordPress REST APIs.
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
Success! There were no dangerous files found in this plugin1,917 lines of code in 46 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 35 | 397 | 577 | 1,770 |
Markdown | 1 | 41 | 0 | 73 |
JavaScript | 4 | 8 | 5 | 30 |
JSON | 2 | 0 | 0 | 24 |
Sass | 1 | 3 | 0 | 17 |
CSS | 3 | 0 | 0 | 3 |
PHP code Passed 2 tests
This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.34 |
Average class complexity | 9.04 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 48.00 |
Average method complexity | 2.07 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 18.00 |
Code structure | ||
---|---|---|
Namespaces | 6 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 23 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 23 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 148 | |
▷ Static methods | 23 | 15.54% |
▷ Public methods | 136 | 91.89% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 12 | 8.11% |
Functions | 21 | |
▷ Named functions | 0 | 0.00% |
▷ Anonymous functions | 21 | 100.00% |
Constants | 6 | |
▷ Global constants | 1 | 16.67% |
▷ Class constants | 5 | 83.33% |
▷ Public constants | 5 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin