83% wp-api-json-reader

Code Review | WP API JSON READER

WordPress plugin WP API JSON READER scored83%from 54 tests.

About plugin

  • Plugin page: wp-api-json-reader
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-4.4.2
  • WordPress version: 6.3.1
  • First release: May 27, 2015
  • Latest release: May 28, 2015
  • Number of updates: 5
  • Update frequency: every 0.2 days
  • Top authors: elsteno (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,379 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

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

Server-side resources used by WP API JSON READER
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0134.48 ▼6.19
Dashboard /wp-admin3.32 ▲0.0147.88 ▲3.37
Posts /wp-admin/edit.php3.37 ▲0.0145.87 ▲1.19
Add New Post /wp-admin/post-new.php5.90 ▲0.0181.48 ▼12.28
Media Library /wp-admin/upload.php3.24 ▲0.0138.06 ▲3.95

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_wp_api_json_feeds
widget_recent-posts
can_compress_scripts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for WP API JSON READER
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲7013.20 ▼1.001.64 ▼0.5040.43 ▼9.83
Dashboard /wp-admin2,209 ▲185.85 ▲0.97111.63 ▲1.9243.27 ▲0.54
Posts /wp-admin/edit.php2,092 ▲31.99 ▼0.0341.72 ▲4.7134.75 ▼1.58
Add New Post /wp-admin/post-new.php1,533 ▲1923.03 ▲5.48642.42 ▼6.6354.12 ▲5.83
Media Library /wp-admin/upload.php1,391 ▼04.18 ▼0.0497.54 ▼2.1942.45 ▼1.42

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
The following items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_wp_api_json_feeds
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

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
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/wp-api-json-reader/wpapi-json-reader.php:46

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (This screen shot description corresponds to screenshot-1.(png|jpg|jpeg|gif). Note that the screenshot is taken from), #2 (This is the second screen shot)
Please take inspiration from this readme.txt

wp-api-json-reader/wpapi-json-reader.php 77% from 13 tests

The principal PHP file in "WP API JSON READER" v. 1.1 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("wp-api-json-reader.php" instead of "wpapi-json-reader.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 143 characters long)
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected111 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1746293
CSS12018

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 code0.15
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity3.25
▷ 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%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected