84% json-api-user

Code Review | JSON API User

WordPress plugin JSON API User scored84%from 54 tests.

About plugin

  • Plugin page: json-api-user
  • Plugin version: 3.9.3
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.4.1
  • WordPress version: 6.3.1
  • First release: Dec 3, 2013
  • Latest release: Nov 9, 2023
  • Number of updates: 90
  • Update frequency: every 40.3 days
  • Top authors: parorrey (100%)

Code review

54 tests

User reviews

20 reviews

Install metrics

2,000+ active /103,497 total downloads

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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼3.68ms] Passed 4 tests

This is a short check of server-side resources used by JSON API User
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.64 ▲0.57
Dashboard /wp-admin3.32 ▲0.0144.23 ▼5.05
Posts /wp-admin/edit.php3.37 ▲0.0146.41 ▼1.62
Add New Post /wp-admin/post-new.php5.90 ▲0.0190.23 ▼8.61
Media Library /wp-admin/upload.php3.24 ▲0.0135.38 ▲3.57

Server storage [IO: ▲0.04MB] [DB: ▲0.00MB] Passed 3 tests

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for JSON API User
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,830 ▲6814.67 ▲0.542.10 ▲0.4245.84 ▲6.81
Dashboard /wp-admin2,207 ▲335.58 ▼0.0491.86 ▲2.9043.95 ▼2.77
Posts /wp-admin/edit.php2,115 ▲151.95 ▼0.0141.97 ▲1.8939.18 ▲0.24
Add New Post /wp-admin/post-new.php1,540 ▲1423.20 ▼0.38596.91 ▼51.0956.98 ▲8.78
Media Library /wp-admin/upload.php1,415 ▲154.23 ▲0.0598.24 ▼10.8341.60 ▼2.39

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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > 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-user/json-api-user.php on line 23
    • > PHP Warning
      include_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/json-api-user/json-api-user.php on line 23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_plugin_active() in wp-content/plugins/json-api-user/json-api-user.php:29
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHwp-admin/includes/plugin.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/json-api-user/json-api-user.php on line 23

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 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: authentication, restful facebook login, restful user meta and buddypress xprofile, restful user registration, json api

json-api-user/json-api-user.php 92% from 13 tests

"JSON API User" version 3.9.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Description: Keep the plugin description shorter than 140 characters (currently 184 characters long)

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
Success! There were no dangerous files found in this plugin611 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP239950611

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 code0.42
Average class complexity104.00
▷ Minimum class complexity104.00
▷ Maximum class complexity104.00
Average method complexity7.25
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods17100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions583.33%
▷ Anonymous functions116.67%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin