Benchmarks
Plugin footprint 58% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
It is recommended to fix the following installer errors
- The plugin cannot be installed
- > Deprecated in wp-content/plugins/lnp-api-client/niki-api-client.php+61
Non-static method Niki_Plugin::flush_rewrite_rules() should not be called statically
Server metrics [RAM: ▲0.25MB] [CPU: ▼2.28ms] Passed 4 tests
An overview of server-side resources used by Niki API Client
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.73 ▲0.26 | 37.15 ▼1.69 |
Dashboard /wp-admin | 3.57 ▲0.22 | 47.04 ▼10.26 |
Posts /wp-admin/edit.php | 3.69 ▲0.32 | 52.04 ▲7.92 |
Add New Post /wp-admin/post-new.php | 6.15 ▲0.26 | 103.11 ▲4.41 |
Media Library /wp-admin/upload.php | 3.49 ▲0.26 | 34.57 ▼1.58 |
Niki Server /wp-admin/admin.php?page=niki_server | 3.44 | 33.35 |
Niki Projecten /wp-admin/admin.php?page=niki_projects | 3.46 | 30.78 |
Server storage [IO: ▲0.15MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-posts |
can_compress_scripts |
theysaidso_admin_options |
widget_recent-comments |
db_upgraded |
widget_theysaidso_widget |
Browser metrics Passed 4 tests
Niki API Client: an overview of browser usage
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,816 ▲55 | 14.34 ▼0.01 | 1.50 ▼0.24 | 38.24 ▼3.05 |
Dashboard /wp-admin | 2,225 ▲45 | 5.57 ▼0.22 | 83.31 ▼7.53 | 41.71 ▲1.58 |
Posts /wp-admin/edit.php | 2,127 ▲27 | 2.03 ▲0.05 | 38.73 ▲0.63 | 36.53 ▼0.55 |
Add New Post /wp-admin/post-new.php | 1,547 ▲19 | 23.17 ▲0.12 | 634.08 ▼43.74 | 52.74 ▲2.92 |
Media Library /wp-admin/upload.php | 1,427 ▲27 | 4.24 ▲0.04 | 93.92 ▼5.32 | 45.82 ▼1.72 |
Niki Server /wp-admin/admin.php?page=niki_server | 828 | 2.03 | 22.81 | 28.63 |
Niki Projecten /wp-admin/admin.php?page=niki_projects | 805 | 1.99 | 24.87 | 32.56 |
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
It is recommended to fix the following
- Zombie WordPress options were found after uninstall: 6 options
- widget_recent-posts
- db_upgraded
- can_compress_scripts
- theysaidso_admin_options
- widget_theysaidso_widget
- widget_recent-comments
Smoke tests 25% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
- 2 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=niki_server
- > Notice in wp-content/plugins/lnp-api-client/classes/class-niki_plugin_base.php+636
Trying to access array offset on value of type bool
SRP 0% from 2 tests
🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
- 2× PHP files perform the task of outputting text when accessed with GET requests:
- > /wp-content/plugins/lnp-api-client/niki-api-client.php
- > /wp-content/plugins/lnp-api-client/classes/class-niki_api.php
- 11× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Using $this when not in object context in wp-content/plugins/lnp-api-client/examples/classes/interest_confirm_mail.php:23
- > PHP Warning
Use of undefined constant WP_DEBUG - assumed 'WP_DEBUG' (this will throw an Error in a future version of PHP) in wp-content/plugins/lnp-api-client/examples/theme/niki-template/index.php on line 10
- > PHP Fatal error
Uncaught Error: Call to undefined function get_header() in wp-content/plugins/lnp-api-client/examples/theme/niki-template/index.php:21
- > PHP Warning
Use of undefined constant WP_DEBUG - assumed 'WP_DEBUG' (this will throw an Error in a future version of PHP) in wp-content/plugins/lnp-api-client/classes/debug.php on line 58
- > PHP Fatal error
require_once(): Failed opening required 'ABSPATHwp-admin/includes/template.php' (include_path='.:/usr/share/php') in wp-content/plugins/lnp-api-client/classes/class-niki_plugin_base.php on line 44
- > ▒▒▒▒▒NEW REQUEST (2023-10-20 22
37:01)▒▒▒▒▒
- > PHP Warning
Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/lnp-api-client/classes/class-niki_plugin_base.php on line 44
- > PHP Warning
require_once(ABSPATHwp-admin/includes/template.php): failed to open stream: No such file or directory in wp-content/plugins/lnp-api-client/classes/class-niki_plugin_base.php on line 44
- > niki template
main index.php start
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/lnp-api-client/examples/theme/niki-template/functions.php:2
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 93% from 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
3 plugin tags: niki rest api, client, api
lnp-api-client/niki-api-client.php 85% from 13 tests
The main file in "Niki API Client" v. 0.3.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
- Main file name: It is recommended to name the main PHP file as the plugin slug ("lnp-api-client.php" instead of "niki-api-client.php")
- Description: Please keep the plugin description shorter than 140 characters (currently 155 characters long)
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
There were no executable files found in this plugin2,356 lines of code in 12 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 11 | 355 | 1,677 | 2,288 |
CSS | 1 | 13 | 13 | 68 |
PHP code Passed 2 tests
Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.38 |
Average class complexity | 57.29 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 114.00 |
Average method complexity | 6.47 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 47.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 1 | |
Traits | 0 | |
Classes | 6 | |
▷ Abstract classes | 1 | 16.67% |
▷ Concrete classes | 5 | 83.33% |
▷ Final classes | 0 | 0.00% |
Methods | 76 | |
▷ Static methods | 14 | 18.42% |
▷ Public methods | 50 | 65.79% |
▷ Protected methods | 1 | 1.32% |
▷ Private methods | 25 | 32.89% |
Functions | 8 | |
▷ Named functions | 8 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 6 | |
▷ Global constants | 3 | 50.00% |
▷ Class constants | 3 | 50.00% |
▷ Public constants | 3 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin