78% json-options

Code Review | JSON Options

WordPress plugin JSON Options scored78%from 54 tests.

About plugin

  • Plugin page: json-options
  • Plugin version: 0.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-3.5.1
  • WordPress version: 6.3.1
  • First release: May 23, 2013
  • Latest release: Jun 21, 2013
  • Number of updates: 18
  • Update frequency: every 1.6 days
  • Top authors: JeremyJanrain (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /4,524 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 gracefully, with no errors

Server metrics [RAM: ▲0.13MB] [CPU: ▼1.05ms] Passed 4 tests

Server-side resources used by JSON Options
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1239.73 ▼1.34
Dashboard /wp-admin3.43 ▲0.1347.33 ▼2.85
Posts /wp-admin/edit.php3.54 ▲0.1951.79 ▲6.75
Add New Post /wp-admin/post-new.php6.01 ▲0.1394.44 ▼2.44
Media Library /wp-admin/upload.php3.35 ▲0.1337.00 ▲2.44
- Import JSON /wp-admin/admin.php?page=json_options_import3.2931.48
- Export JSON /wp-admin/admin.php?page=json_options_export3.2930.67
JSON Options /wp-admin/admin.php?page=json_options3.3233.28

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
json_options_filters_available
widget_recent-comments
widget_recent-posts
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for JSON Options
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲9614.47 ▲0.111.82 ▲0.0643.59 ▼5.98
Dashboard /wp-admin2,237 ▲495.78 ▲0.69100.21 ▼2.1539.58 ▼5.24
Posts /wp-admin/edit.php2,123 ▲342.00 ▼0.0340.48 ▼5.7635.35 ▼2.73
Add New Post /wp-admin/post-new.php1,558 ▲2323.07 ▲0.02610.35 ▼74.0861.39 ▲4.60
Media Library /wp-admin/upload.php1,422 ▲314.21 ▼0.06102.16 ▲6.5242.19 ▼0.25
- Import JSON /wp-admin/admin.php?page=json_options_import1,0032.0223.0530.60
- Export JSON /wp-admin/admin.php?page=json_options_export1,0062.0523.1026.51
JSON Options /wp-admin/admin.php?page=json_options9352.0524.0626.86

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • json_options_filters_available
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These errors were triggered by the plugin
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=json_options_export
    • > Notice in wp-content/plugins/json-options/json-options.php+377
    Undefined index: description
  • 14 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=json_options_export
    • > Notice in wp-content/plugins/json-options/json-options.php+453
    Undefined index: selected

SRP 50% 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 take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/json-options/json-options.php:772

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
The official readme.txt might help

json-options/json-options.php 92% from 13 tests

"JSON Options" version 0.0.4's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 427 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin692 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1085692

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity112.00
▷ Minimum class complexity112.00
▷ Maximum class complexity112.00
Average method complexity8.40
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods1066.67%
▷ Protected methods00.00%
▷ Private methods533.33%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin