Benchmarks
Plugin footprint 65% 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.23MB] [CPU: ▼47.30ms] Passed 4 tests
An overview of server-side resources used by ng-wp-rest
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.74 ▼0.72 | 14.90 ▼26.85 |
Dashboard /wp-admin | 2.78 ▼0.52 | 16.92 ▼35.77 |
Posts /wp-admin/edit.php | 2.78 ▼0.57 | 16.52 ▼36.34 |
Add New Post /wp-admin/post-new.php | 2.78 ▼3.10 | 16.77 ▼90.22 |
Media Library /wp-admin/upload.php | 2.78 ▼0.45 | 16.13 ▼20.36 |
Server storage [IO: ▲0.08MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-comments |
can_compress_scripts |
theysaidso_admin_options |
db_upgraded |
widget_theysaidso_widget |
widget_recent-posts |
Browser metrics Passed 4 tests
Checking browser requirements for ng-wp-rest
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,789 ▲28 | 14.28 ▼0.08 | 1.72 ▼0.06 | 43.65 ▼6.90 |
Dashboard /wp-admin | 2,195 ▲21 | 5.58 ▲0.06 | 91.85 ▼6.73 | 40.71 ▼8.05 |
Posts /wp-admin/edit.php | 2,097 ▼3 | 2.02 ▲0.04 | 38.92 ▲2.11 | 34.45 ▼5.71 |
Add New Post /wp-admin/post-new.php | 6,230 ▲4,695 | 18.98 ▲0.73 | 919.64 ▲302.17 | 56.21 ▼5.38 |
Media Library /wp-admin/upload.php | 1,400 ▼0 | 4.20 ▼0.03 | 97.87 ▼9.64 | 46.20 ▲2.84 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
- The plugin did not uninstall gracefully
- > User notice in wp-includes/functions.php+5905
Function register_rest_route was called incorrectly. REST API routes must be registered on the rest_api_init action. Please see Debugging in WordPress for more information. (This message was added in version 5.1.0.)
- This plugin did not uninstall successfully, leaving 6 options in the database
- widget_recent-comments
- widget_theysaidso_widget
- widget_recent-posts
- db_upgraded
- theysaidso_admin_options
- can_compress_scripts
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected
SRP 50% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
- 8× PHP files perform the task of outputting text when accessed with GET requests:
- > /wp-content/plugins/ng-wp-endpoints/includes/ng-wp-abstract.php
- > /wp-content/plugins/ng-wp-endpoints/includes/ng-wp-interface.php
- > /wp-content/plugins/ng-wp-endpoints/includes/ng-wp-endpoints-add-fields.php
- > /wp-content/plugins/ng-wp-endpoints/includes/ng-wp-rest-menus-controller.php
- > /wp-content/plugins/ng-wp-endpoints/ng-wp-rest-controller.php
- > /wp-content/plugins/ng-wp-endpoints/includes/ng-wp-rest-widgets-controller.php
- > /wp-content/plugins/ng-wp-endpoints/includes/ng-wp-rest-custom-post-types-controller.php
- > /wp-content/plugins/ng-wp-endpoints/includes/ng-wp-rest-sidebars-controller.php
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found
Optimizations
Plugin configuration 96% from 29 tests
readme.txt Passed 16 tests
The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
1 plugin tags: rest api headless cms
ng-wp-endpoints/ng-wp-rest-controller.php 92% from 13 tests
"ng-wp-rest" version 1.5.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
- Main file name: The principal plugin file should be the same as the plugin slug ("ng-wp-endpoints.php" instead of "ng-wp-rest-controller.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin765 lines of code in 10 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 9 | 147 | 443 | 707 |
Markdown | 1 | 28 | 0 | 58 |
PHP code Passed 2 tests
A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.24 |
Average class complexity | 9.00 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 25.00 |
Average method complexity | 2.36 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 6.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 1 | |
Traits | 0 | |
Classes | 7 | |
▷ Abstract classes | 1 | 14.29% |
▷ Concrete classes | 6 | 85.71% |
▷ Final classes | 0 | 0.00% |
Methods | 49 | |
▷ Static methods | 2 | 4.08% |
▷ Public methods | 41 | 83.67% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 8 | 16.33% |
Functions | 3 | |
▷ Named functions | 1 | 33.33% |
▷ Anonymous functions | 2 | 66.67% |
Constants | 6 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 6 | 100.00% |
▷ Public constants | 6 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin