10% get-json-api

Code Review | Get Json Api

WordPress plugin Get Json Api scored10%from 54 tests.

About plugin

  • Plugin page: get-json-api
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-3.4
  • WordPress version: 6.3.1
  • First release: Jan 8, 2014
  • Latest release: Jan 8, 2014
  • Number of updates: 7
  • Update frequency: every 0.1 days
  • Top authors: digitalissimo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,948 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The following installer errors require your attention
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/get-json-api/function/widget.php+2
    Methods with the same name as their class will not be constructors in a future version of PHP; getjsonapi_cycle_widget has a deprecated constructor

Server metrics [RAM: ▼1.92MB] [CPU: ▼59.68ms] Passed 4 tests

A check of server-side resources used by Get Json Api
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.08 ▼1.384.31 ▼36.38
Dashboard /wp-admin2.10 ▼1.246.55 ▼55.65
Posts /wp-admin/edit.php2.10 ▼1.255.95 ▼46.72
Add New Post /wp-admin/post-new.php2.10 ▼3.785.51 ▼99.98
Media Library /wp-admin/upload.php2.10 ▼1.136.54 ▼31.14

Server storage [IO: ▲0.05MB] [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: 9 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
widget_getjsonapi

Browser metrics Passed 4 tests

A check of browser resources used by Get Json Api
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,912 ▲15113.83 ▼0.535.85 ▲4.1137.96 ▼2.81
Dashboard /wp-admin2,227 ▲264.95 ▲0.04111.65 ▼3.0739.44 ▼8.08
Posts /wp-admin/edit.php2,103 ▲62.12 ▲0.1038.37 ▲0.7237.24 ▲0.56
Add New Post /wp-admin/post-new.php1,532 ▲117.51 ▼5.92642.86 ▼51.7564.46 ▲0.87
Media Library /wp-admin/upload.php1,409 ▲94.31 ▲0.0797.93 ▼8.6842.05 ▼9.70

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/get-json-api/function/widget.php+2
    Methods with the same name as their class will not be constructors in a future version of PHP; getjsonapi_cycle_widget has a deprecated constructor
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_getjsonapi
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/get-json-api/function/widget.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/get-json-api/function/shortcode.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/get-json-api/function/widget.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
4 plugin tags: json api, widget, json, shortcode

get-json-api/get-json-api.php Passed 13 tests

"Get Json Api" version 0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
71 characters long description:
Retrieve the results of the API of a site that uses the plugin JSON API

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin210 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP32922183
CSS10016
JavaScript20811

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity13.00
▷ Minimum class complexity13.00
▷ Maximum class complexity13.00
Average method complexity4.00
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.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
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
plugin/cycle/banner-772x2502.png15.95KB5.14KB▼ 67.81%