Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully
Server metrics [RAM: ▲0.03MB] [CPU: ▼2.61ms] Passed 4 tests
An overview of server-side resources used by Turn Off REST API
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.49 ▲0.03 | 43.69 ▲4.16 |
Dashboard /wp-admin | 3.34 ▲0.03 | 50.73 ▲2.16 |
Posts /wp-admin/edit.php | 3.39 ▲0.03 | 50.04 ▲2.58 |
Add New Post /wp-admin/post-new.php | 5.94 ▲0.05 | 81.55 ▼12.25 |
Media Library /wp-admin/upload.php | 3.26 ▲0.03 | 33.69 ▼2.93 |
Turn Off REST API /wp-admin/options-general.php?page=turnoff_rest_api_settings | 4.62 | 36.77 |
Server storage [IO: ▲0.05MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options |
---|
can_compress_scripts |
db_upgraded |
widget_theysaidso_widget |
theysaidso_admin_options |
widget_recent-comments |
widget_recent-posts |
Browser metrics Passed 4 tests
An overview of browser requirements for Turn Off REST API
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,796 ▲35 | 14.42 ▲0.07 | 1.72 ▲0.08 | 43.39 ▲3.23 |
Dashboard /wp-admin | 2,203 ▲23 | 5.64 ▼0.02 | 85.04 ▼3.05 | 38.82 ▲1.40 |
Posts /wp-admin/edit.php | 2,087 ▼13 | 2.11 ▲0.15 | 34.78 ▲0.52 | 34.49 ▲0.43 |
Add New Post /wp-admin/post-new.php | 1,542 ▲16 | 18.20 ▼5.00 | 592.17 ▼118.60 | 63.03 ▲9.78 |
Media Library /wp-admin/upload.php | 1,402 ▲5 | 4.17 ▼0.02 | 97.97 ▲2.06 | 40.88 ▼4.98 |
Turn Off REST API /wp-admin/options-general.php?page=turnoff_rest_api_settings | 1,834 | 2.19 | 25.06 | 30.12 |
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
You still need to fix the following
- This plugin does not fully uninstall, leaving 6 options in the database
- db_upgraded
- can_compress_scripts
- widget_theysaidso_widget
- widget_recent-comments
- widget_recent-posts
- theysaidso_admin_options
Smoke tests Passed 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test
SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
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
5 plugin tags: api, disable rest api, json, admin, rest
turn-off-rest-api/turn-off-rest-api.php Passed 13 tests
The primary PHP file in "Turn Off REST API" version 1.0.4 is used by WordPress to initiate all plugin functionality
58 characters long description:
Prevents unauthorized requests from using the WP REST API.
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected312 lines of code in 8 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 4 | 64 | 197 | 207 |
Markdown | 1 | 25 | 0 | 41 |
PO File | 1 | 12 | 12 | 41 |
CSS | 1 | 3 | 1 | 13 |
JavaScript | 1 | 2 | 1 | 10 |
PHP code Passed 2 tests
This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.31 |
Average class complexity | 15.00 |
▷ Minimum class complexity | 15.00 |
▷ Maximum class complexity | 15.00 |
Average method complexity | 2.00 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 7.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 1 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 1 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 14 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 8 | 57.14% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 6 | 42.86% |
Functions | 4 | |
▷ Named functions | 3 | 75.00% |
▷ Anonymous functions | 1 | 25.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
Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin