74% json-reader

Code Review | Json Reader

WordPress plugin Json Reader scored74%from 54 tests.

About plugin

  • Plugin page: json-reader
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.6.1
  • WordPress version: 6.3.1
  • First release: Jul 24, 2017
  • Latest release: Jul 24, 2017
  • Number of updates: 10
  • Update frequency: every 0.9 days
  • Top authors: dessainsaraiva (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /815 total downloads

Benchmarks

Plugin footprint 65% 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.92MB] [CPU: ▼30.36ms] Passed 4 tests

A check of server-side resources used by Json Reader
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0140.06 ▼5.61
Dashboard /wp-admin3.03 ▼0.2824.45 ▼21.59
Posts /wp-admin/edit.php3.03 ▼0.3324.98 ▼22.43
Add New Post /wp-admin/post-new.php3.03 ▼2.8624.30 ▼68.16
Media Library /wp-admin/upload.php3.03 ▼0.2023.54 ▼9.26

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Json Reader
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.40 ▼0.981.67 ▼0.2640.51 ▼3.32
Dashboard /wp-admin2,206 ▲155.90 ▲1.02106.60 ▼1.2341.83 ▼2.60
Posts /wp-admin/edit.php2,089 ▲32.00 ▲0.0140.77 ▲3.6936.50 ▲1.42
Add New Post /wp-admin/post-new.php1,542 ▲2818.44 ▲0.97610.23 ▼47.4858.25 ▲1.78
Media Library /wp-admin/upload.php1,388 ▼34.21 ▲0.0695.45 ▼11.5740.73 ▼5.49

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • The plugin did not uninstall gracefully
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, class 'jsonReader' does not have a method 'settings'
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/json-reader/json-reader.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser 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
2 plugin tags: son reader, json

json-reader/json-reader.php Passed 13 tests

The main PHP script in "Json Reader" version 1.0 is automatically included on every request by WordPress
73 characters long description:
Reads Json files and display the feed, with: [jsonReader src="feed.json"]

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin56 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1152256

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity2.67
▷ Minimum method complexity2.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods266.67%
▷ Protected methods133.33%
▷ Private methods00.00%
Functions0
▷ Named functions00.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
No PNG images were found in this plugin