84% sb-chart-block

Code Review | SB Chart block

WordPress plugin SB Chart block scored84%from 54 tests.

About plugin

  • Plugin page: sb-chart-block
  • Plugin version: 1.2.5
  • PHP compatiblity: 7.2.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6.0+
  • WordPress version: 6.3.1
  • First release: Apr 20, 2021
  • Latest release: Oct 20, 2023
  • Number of updates: 20
  • Update frequency: every 45.7 days
  • Top authors: bobbingwide (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /3,966 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

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

Server-side resources used by SB Chart block
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0441.31 ▲5.09
Dashboard /wp-admin3.35 ▲0.0448.15 ▼2.03
Posts /wp-admin/edit.php3.40 ▲0.0445.66 ▲0.85
Add New Post /wp-admin/post-new.php5.93 ▲0.0480.84 ▼16.48
Media Library /wp-admin/upload.php3.27 ▲0.0434.22 ▼1.49

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 42 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for SB Chart block
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,792 ▲3114.34 ▲0.111.73 ▲0.1144.08 ▲3.23
Dashboard /wp-admin2,189 ▲155.54 ▼0.0379.99 ▼15.3037.60 ▼15.27
Posts /wp-admin/edit.php2,097 ▼32.00 ▲0.0434.12 ▼3.6834.71 ▼2.92
Add New Post /wp-admin/post-new.php6,379 ▲4,85323.47 ▲0.34887.58 ▲207.7037.61 ▼22.64
Media Library /wp-admin/upload.php1,400 ▼04.21 ▲0.0694.22 ▼7.3942.76 ▼2.40

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
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 add_action() in wp-content/plugins/sb-chart-block/sb-chart-block.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Tested up to: The plugin version is formatted incorrectly
The official readme.txt is a good inspiration

sb-chart-block/sb-chart-block.php Passed 13 tests

Analyzing the main PHP file in "SB Chart block" version 1.2.5
32 characters long description:
Displays a Chart for CSV content

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
Success! There were no dangerous files found in this plugin16,285 lines of code in 34 files:
LanguageFilesBlank linesComment linesLines of code
JSON62014,619
JavaScript16186438752
PHP5121332600
PO File210498260
Sass29027
Markdown112025
CSS2002

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity42.00
▷ Minimum class complexity6.00
▷ Maximum class complexity78.00
Average method complexity3.34
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods35
▷ Static methods00.00%
▷ Public methods35100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
PNG images were not found in this plugin