Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully
Server metrics [RAM: ▲0.01MB] [CPU: ▼4.22ms] Passed 4 tests
This is a short check of server-side resources used by WordPress REST API (Version 2)
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.47 ▲0.01 | 30.73 ▼22.19 |
Dashboard /wp-admin | 3.31 ▲0.01 | 43.48 ▼2.18 |
Posts /wp-admin/edit.php | 3.36 ▲0.01 | 48.16 ▲1.78 |
Add New Post /wp-admin/post-new.php | 6.79 ▲0.90 | 99.56 ▲5.71 |
Media Library /wp-admin/upload.php | 3.23 ▲0.01 | 42.24 ▲7.10 |
Server storage [IO: ▲0.56MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 27 new files
Database: no new tables, 6 new options
New WordPress options |
---|
db_upgraded |
theysaidso_admin_options |
widget_recent-comments |
widget_recent-posts |
can_compress_scripts |
widget_theysaidso_widget |
Browser metrics Passed 4 tests
An overview of browser requirements for WordPress REST API (Version 2)
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,800 ▲43 | 13.31 ▼1.12 | 1.88 ▼0.51 | 40.30 ▼32.69 |
Dashboard /wp-admin | 2,206 ▲18 | 5.91 ▲1.04 | 105.43 ▼1.81 | 42.83 ▼0.03 |
Posts /wp-admin/edit.php | 2,089 ▼0 | 2.01 ▼0.03 | 40.13 ▲1.86 | 36.50 ▲3.80 |
Add New Post /wp-admin/post-new.php | 1,533 ▼1 | 23.36 ▲0.22 | 585.93 ▼105.25 | 54.41 ▼14.37 |
Media Library /wp-admin/upload.php | 1,388 ▼0 | 4.19 ▼0.00 | 108.38 ▲4.16 | 42.78 ▼4.26 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
- This plugin did not uninstall successfully, leaving 6 options in the database
- widget_recent-posts
- widget_recent-comments
- can_compress_scripts
- widget_theysaidso_widget
- db_upgraded
- theysaidso_admin_options
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested
SRP 50% from 2 tests
🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
- 17× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'WP_REST_Controller' not found in wp-content/plugins/rest-api/lib/endpoints/class-wp-rest-revisions-controller.php:3
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/rest-api/extras.php:11
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/rest-api/core-integration.php:15
- > PHP Fatal error
Uncaught Error: Class 'WP_REST_Controller' not found in wp-content/plugins/rest-api/lib/endpoints/class-wp-rest-taxonomies-controller.php:3
- > PHP Fatal error
Uncaught Error: Class 'WP_REST_Controller' not found in wp-content/plugins/rest-api/lib/endpoints/class-wp-rest-terms-controller.php:6
- > PHP Fatal error
Uncaught Error: Class 'WP_REST_Posts_Controller' not found in wp-content/plugins/rest-api/lib/endpoints/class-wp-rest-attachments-controller.php:3
- > PHP Fatal error
Uncaught Error: Class 'WP_REST_Meta_Fields' not found in wp-content/plugins/rest-api/lib/fields/class-wp-rest-comment-meta-fields.php:3
- > PHP Fatal error
Uncaught Error: Class 'WP_REST_Controller' not found in wp-content/plugins/rest-api/lib/endpoints/class-wp-rest-post-types-controller.php:3
- > PHP Fatal error
Uncaught Error: Class 'WP_REST_Controller' not found in wp-content/plugins/rest-api/lib/endpoints/class-wp-rest-comments-controller.php:6
- > PHP Fatal error
Uncaught Error: Class 'WP_REST_Meta_Fields' not found in wp-content/plugins/rest-api/lib/fields/class-wp-rest-post-meta-fields.php:3
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 90% from 29 tests
readme.txt 94% from 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
Attributes that need to be fixed:
- Tested up to: Version format is invalid
rest-api/plugin.php 85% from 13 tests
Analyzing the main PHP file in "WordPress REST API (Version 2)" version 2.0-beta15...
Please make the necessary changes and fix the following:
- Main file name: Please rename the main PHP file in this plugin to the plugin slug ("rest-api.php" instead of "plugin.php")
- Version: The version number should only use digits and periods (ex. "1.0.3" instead of "2.0-beta15...")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin8,890 lines of code in 24 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 19 | 1,120 | 2,005 | 5,645 |
Markdown | 3 | 1,537 | 0 | 2,525 |
JavaScript | 2 | 239 | 384 | 720 |
PHP code Passed 2 tests
This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.57 |
Average class complexity | 57.25 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 274.00 |
Average method complexity | 5.48 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 50.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 16 | |
▷ Abstract classes | 2 | 12.50% |
▷ Concrete classes | 14 | 87.50% |
▷ Final classes | 0 | 0.00% |
Methods | 203 | |
▷ Static methods | 2 | 0.99% |
▷ Public methods | 148 | 72.91% |
▷ Protected methods | 55 | 27.09% |
▷ Private methods | 0 | 0.00% |
Functions | 22 | |
▷ Named functions | 22 | 100.00% |
▷ Anonymous functions | 0 | 0.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
Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin