78% json-dashboard-infos

Code Review | JSON Dashboard Infos

WordPress plugin JSON Dashboard Infos scored 78% from 54 tests.

About plugin

  • Plugin page: json-dashboard-infos
  • Plugin version: 1.0.4
  • PHP compatiblity: 5.3.29+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.5.1
  • WordPress version: 6.3.1
  • First release: Sep 3, 2020
  • Latest release: Sep 12, 2020
  • Number of updates: 17
  • Update frequency: every 0.9 days
  • Top authors: richnou (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 453 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.10MB] [CPU: ▼2.84ms] Passed 4 tests

Server-side resources used by JSON Dashboard Infos
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1036.42 ▼4.48
Dashboard /wp-admin3.41 ▲0.1146.95 ▼2.85
Posts /wp-admin/edit.php3.52 ▲0.1746.07 ▼6.66
Add New Post /wp-admin/post-new.php5.99 ▲0.10100.79 ▲7.41
Media Library /wp-admin/upload.php3.33 ▲0.1036.80 ▲2.64
JSON Dashboard Infos /wp-admin/options-general.php?page=json-dashboard-infos/index.php3.3042.86

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 13 new files
Database: no new tables, 7 new options
New WordPress options
jsondi
widget_theysaidso_widget
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for JSON Dashboard Infos
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲4913.37 ▼1.014.22 ▲2.3341.10 ▲1.58
Dashboard /wp-admin2,212 ▲245.79 ▼0.0797.41 ▼1.7841.94 ▲3.96
Posts /wp-admin/edit.php2,095 ▲62.00 ▼0.0137.05 ▼3.7236.13 ▲0.85
Add New Post /wp-admin/post-new.php1,533 ▲1223.34 ▲0.10622.71 ▼57.6961.50 ▲6.26
Media Library /wp-admin/upload.php1,397 ▲64.20 ▼0.0293.81 ▼6.5341.90 ▼4.87
JSON Dashboard Infos /wp-admin/options-general.php?page=json-dashboard-infos/index.php1,2111.6921.8561.27

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • jsondi
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

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 server-side errors were triggered
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=json-dashboard-infos/index.php
    • > Notice in wp-content/plugins/json-dashboard-infos/includes/tools.php+132
    Undefined variable: sz
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=json-dashboard-infos/index.php
    • > Notice in wp-content/plugins/json-dashboard-infos/includes/tools.php+132
    Trying to access array offset on value of type null
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=json-dashboard-infos/index.php
    • > Notice in wp-content/plugins/json-dashboard-infos/includes/tools.php+132
    String offset cast occurred
    • > GET request to /wp-admin/options-general.php?page=json-dashboard-infos/index.php
    • > Notice in wp-content/plugins/json-dashboard-infos/includes/get_datas.php+349
    Array to string conversion

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/json-dashboard-infos/index.php:38

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
6 plugin tags: stats, export data, api, comments, json...

json-dashboard-infos/index.php 92% from 13 tests

The entry point to "JSON Dashboard Infos" version 1.0.4 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("json-dashboard-infos.php" instead of "index.php")

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
No dangerous file extensions were detected808 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP5108238681
PO File1272976
CSS18051

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.34
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%
Functions32
▷ Named functions32100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.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
3 PNG files occupy 0.42MB with 0.30MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png140.12KB39.25KB▼ 71.99%
screenshot-1.png234.64KB72.45KB▼ 69.12%
screenshot-3.png60.26KB15.67KB▼ 73.99%