83% chart-block

Code Review | Chart Block - Represent your data by chart

WordPress plugin Chart Block - Represent your data by chart scored83%from 54 tests.

About plugin

  • Plugin page: chart-block
  • Plugin version: 1.1.4
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Oct 15, 2021
  • Latest release: Oct 3, 2023
  • Number of updates: 33
  • Update frequency: every 21.8 days
  • Top authors: charlescormier (90.91%)abuhayat (12.12%)

Code review

54 tests

User reviews

7 reviews

Install metrics

800+ active /5,844 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼6.09ms] Passed 4 tests

An overview of server-side resources used by Chart Block - Represent your data by chart
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0538.90 ▲0.48
Dashboard /wp-admin3.35 ▲0.0442.88 ▼4.06
Posts /wp-admin/edit.php3.40 ▲0.0442.93 ▼5.86
Add New Post /wp-admin/post-new.php5.96 ▲0.0782.44 ▼14.91
Media Library /wp-admin/upload.php3.27 ▲0.0435.95 ▲1.77

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 19 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Chart Block - Represent your data by chart
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲5714.18 ▼0.1614.39 ▲12.8335.07 ▼5.38
Dashboard /wp-admin2,195 ▲285.54 ▼0.0481.72 ▼12.4841.95 ▼1.83
Posts /wp-admin/edit.php2,097 ▼32.02 ▲0.0034.91 ▼6.5235.14 ▼9.02
Add New Post /wp-admin/post-new.php6,382 ▲4,85623.44 ▲0.13829.05 ▲167.8935.78 ▼23.41
Media Library /wp-admin/upload.php1,397 ▼04.26 ▲0.0397.30 ▼7.9041.10 ▼2.76

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
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
Please fix the following
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Warning
      Use of undefined constant BCHART_PLUGIN_VERSION - assumed 'BCHART_PLUGIN_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/chart-block/dist/script.asset.php on line 4
    • > PHP Warning
      Use of undefined constant BCHART_PLUGIN_VERSION - assumed 'BCHART_PLUGIN_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/chart-block/dist/editor.asset.php on line 4

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)
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% 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
Attributes that need to be fixed:
  • Requires at least: Version format is invalid
  • Screenshots: Screenshot #7 (Chart Settings) image missing
Please take inspiration from this readme.txt

chart-block/plugin.php 92% from 13 tests

The primary PHP file in "Chart Block - Represent your data by chart" version 1.1.4 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("chart-block.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected393 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
JSON200201
PO File164124146
PHP4111441
JavaScript30143
CSS2022

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.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%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin