99% b-chart

Code Review | B Chart - The Chart Plugin for WordPress

WordPress plugin B Chart - The Chart Plugin for WordPress scored 99% from 54 tests.

About plugin

  • Plugin page: b-chart
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-5.8
  • WordPress version: 5.8.1
  • First release: Nov 3, 2021
  • Latest release: Nov 13, 2021
  • Number of updates: 8
  • Update frequency: every 1.3 days
  • Top authors: abuhayat (62.5%)srabonr (50%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active / 67 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.71MB] [CPU: ▼129.78ms] Passed 4 tests

This is a short check of server-side resources used by B Chart - The Chart Plugin for WordPress
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.68 ▲0.9641.52 ▲20.75
Dashboard /wp-admin3.79 ▲0.7352.11 ▲13.34
Posts /wp-admin/edit.php3.84 ▲0.7351.66 ▲9.89
Add New Post /wp-admin/post-new.php6.10 ▲0.67100.55 ▼549.61
Media Library /wp-admin/upload.php3.73 ▲0.7341.34 ▲7.26
Add New /wp-admin/post-new.php?post_type=bchart3.9356.88
All Charts /wp-admin/edit.php?post_type=bchart3.9446.90

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 152 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for B Chart - The Chart Plugin for WordPress
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,754 ▲15816.41 ▲0.8511.36 ▲3.0946.99 ▼0.76
Dashboard /wp-admin3,012 ▲785.89 ▼0.04133.44 ▼11.86112.87 ▼4.19
Posts /wp-admin/edit.php2,775 ▲362.70 ▲0.0168.28 ▲2.7489.68 ▲3.94
Add New Post /wp-admin/post-new.php1,720 ▼15218.97 ▼0.16370.56 ▲5.88106.94 ▼5.79
Media Library /wp-admin/upload.php1,849 ▲395.03 ▼0.01156.72 ▲15.02120.68 ▼2.55
Add New /wp-admin/post-new.php?post_type=bchart4,2505.68182.21185.29
All Charts /wp-admin/edit.php?post_type=bchart1,7274.7388.9274.19

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
This plugin's uninstaller ran successfully

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Screenshots: Please describe screenshot #9 in b-chart/assets to your readme.txt
Please take inspiration from this readme.txt

b-chart/bchart.php 92% from 13 tests

The main file in "B Chart - The Chart Plugin for WordPress" v. 1.0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("b-chart.php" instead of "bchart.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected26,897 lines of code in 126 files:
LanguageFilesBlank linesComment linesLines of code
PHP752,3329547,349
PO File203,1973,5946,490
Sass1595234,803
JavaScript71,2683634,156
CSS72824794,097
SVG2002

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.64
Average class complexity24.26
▷ Minimum class complexity1.00
▷ Maximum class complexity140.00
Average method complexity6.79
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes58
▷ Abstract classes23.45%
▷ Concrete classes5696.55%
▷ Final classes00.00%
Methods233
▷ Static methods4017.17%
▷ Public methods233100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions34
▷ Named functions34100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
inc/codestar/assets/images/checkerboard.png2.29KB2.54KB0.00%