83% display-realtime-json-data-through-ajax

Code Review | Display Real Time JSON data with Auto update

WordPress plugin Display Real Time JSON data with Auto update scored83%from 54 tests.

About plugin

  • Plugin page: display-realtime-...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.9.5
  • WordPress version: 6.3.1
  • First release: May 23, 2018
  • Latest release: May 23, 2018
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: maheshbisen (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /688 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼2.83ms] Passed 4 tests

Analyzing server-side resources used by Display Real Time JSON data with Auto update
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0437.11 ▼6.65
Dashboard /wp-admin3.37 ▲0.0748.28 ▼1.25
Posts /wp-admin/edit.php3.42 ▲0.0751.43 ▲2.05
Add New Post /wp-admin/post-new.php5.97 ▲0.0887.76 ▼5.47
Media Library /wp-admin/upload.php3.29 ▲0.0736.80 ▲3.05

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Display Real Time JSON data with Auto update
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,903 ▲16814.07 ▼0.314.84 ▲3.1539.96 ▼9.40
Dashboard /wp-admin2,219 ▲285.83 ▲0.95105.20 ▼1.4442.30 ▲3.39
Posts /wp-admin/edit.php2,111 ▲222.02 ▼0.0039.39 ▲4.1234.82 ▼1.58
Add New Post /wp-admin/post-new.php1,531 ▼517.60 ▼5.59667.79 ▲52.2554.89 ▲6.35
Media Library /wp-admin/upload.php1,404 ▲224.17 ▲0.0296.82 ▼1.1243.93 ▲3.10

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options were found after uninstall: 7 options
    • drjsondata_options
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

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
Good news, no errors were detected

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 fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/display-realtime-json-data-through-ajax/json-realtime-data-ajax.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed: You can look at the official readme.txt

display-realtime-json-data-through-ajax/json-realtime-data-ajax.php 77% from 13 tests

The main PHP file in "Display Real Time JSON data with Auto update" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("display-realtime-json-data-through-ajax.php" instead of "json-realtime-data-ajax.php")
  • Description: The description should be shorter than 140 characters (currently 180 characters long)
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

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
No dangerous file extensions were detected500 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP418744385
CSS213076
JavaScript212434
JSON1005

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.23
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions17
▷ Named functions17100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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