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.01MB] [CPU: ▼4.88ms] Passed 4 tests
This is a short check of server-side resources used by JSON-API-for-BuddyPress
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.47 ▲0.01 | 40.56 ▲0.03 |
Dashboard /wp-admin | 3.31 ▲0.01 | 48.56 ▼2.72 |
Posts /wp-admin/edit.php | 3.36 ▲0.01 | 51.12 ▼2.05 |
Add New Post /wp-admin/post-new.php | 5.89 ▲0.01 | 84.41 ▼14.76 |
Media Library /wp-admin/upload.php | 3.24 ▲0.01 | 39.14 ▲2.24 |
Server storage [IO: ▲0.08MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options |
---|
theysaidso_admin_options |
widget_recent-comments |
widget_theysaidso_widget |
db_upgraded |
can_compress_scripts |
widget_recent-posts |
Browser metrics Passed 4 tests
An overview of browser requirements for JSON-API-for-BuddyPress
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,800 ▲14 | 14.23 ▼0.49 | 1.89 ▼0.06 | 44.95 ▲5.29 |
Dashboard /wp-admin | 2,206 ▲29 | 5.64 ▼0.06 | 92.34 ▲1.81 | 43.05 ▲0.01 |
Posts /wp-admin/edit.php | 2,114 ▲11 | 2.13 ▲0.10 | 40.38 ▲2.65 | 35.97 ▲1.55 |
Add New Post /wp-admin/post-new.php | 1,539 ▲13 | 23.20 ▲0.17 | 652.16 ▼83.94 | 47.67 ▼12.08 |
Media Library /wp-admin/upload.php | 1,411 ▲11 | 4.15 ▼0.06 | 109.99 ▼18.88 | 46.80 ▼4.18 |
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 does not fully uninstall, leaving 6 options in the database
- can_compress_scripts
- db_upgraded
- widget_theysaidso_widget
- widget_recent-posts
- theysaidso_admin_options
- widget_recent-comments
Smoke tests 75% from 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 50% 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
The following issues need your attention
- 8× PHP files trigger errors when accessed directly with GET requests:
- > PHP Warning
Use of undefined constant JSON_API_FOR_BUDDYPRESS_HOME - assumed 'JSON_API_FOR_BUDDYPRESS_HOME' (this will throw an Error in a future version of PHP) in wp-content/plugins/json-api-for-buddypress/controllers/BuddypressRead.php on line 8
- > PHP Warning
include_once(): Failed opening 'ABSPATHwp-admin/includes/plugin.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/json-api-for-buddypress/json-api-for-buddypress.php on line 13
- > PHP Warning
Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/json-api-for-buddypress/json-api-for-buddypress.php on line 13
- > PHP Fatal error
Uncaught Error: Class 'JSON_API_BuddypressRead_Controller' not found in wp-content/plugins/json-api-for-buddypress/library/functions.class.php:3
- > PHP Warning
require_once(JSON_API_FOR_BUDDYPRESS_HOME/library/functions.class.php): failed to open stream: No such file or directory in wp-content/plugins/json-api-for-buddypress/controllers/BuddypressRead.php on line 8
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/json-api-for-buddypress/json-api-for-buddypress.php:19
- > PHP Warning
include_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/json-api-for-buddypress/json-api-for-buddypress.php on line 13
- > PHP Fatal error
require_once(): Failed opening required 'JSON_API_FOR_BUDDYPRESS_HOME/library/functions.class.php' (include_path='.:/usr/share/php') in wp-content/plugins/json-api-for-buddypress/controllers/BuddypressRead.php on line 8
- > PHP Warning
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration Passed 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
3 plugin tags: json, buddypress, api
json-api-for-buddypress/json-api-for-buddypress.php Passed 13 tests
The main file in "JSON-API-for-BuddyPress" v. 1.0.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
47 characters long description:
Extends the JSON API to be used with Buddypress
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
Success! There were no dangerous files found in this plugin1,155 lines of code in 6 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 4 | 163 | 181 | 995 |
PO File | 2 | 48 | 50 | 160 |
PHP code Passed 2 tests
Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.39 |
Average class complexity | 105.00 |
▷ Minimum class complexity | 78.00 |
▷ Maximum class complexity | 132.00 |
Average method complexity | 7.12 |
▷ Minimum method complexity | 2.00 |
▷ Maximum method complexity | 33.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 2 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 2 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 34 | |
▷ Static methods | 9 | 26.47% |
▷ Public methods | 24 | 70.59% |
▷ Protected methods | 7 | 20.59% |
▷ Private methods | 3 | 8.82% |
Functions | 5 | |
▷ Named functions | 5 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 1 | |
▷ Global constants | 1 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.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