83% wp-beautiful-charts

Code Review | WP Beautiful Charts

WordPress plugin WP Beautiful Charts scored83%from 54 tests.

About plugin

  • Plugin page: wp-beautiful-charts
  • Plugin version: 1.25
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.3
  • WordPress version: 6.3.1
  • First release: Feb 25, 2016
  • Latest release: Jul 31, 2023
  • Number of updates: 31
  • Update frequency: every 87.5 days
  • Top authors: manu225 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /4,430 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

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

A check of server-side resources used by WP Beautiful Charts
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0450.52 ▲9.41
Dashboard /wp-admin3.34 ▲0.0448.90 ▼4.07
Posts /wp-admin/edit.php3.39 ▲0.0449.66 ▼3.66
Add New Post /wp-admin/post-new.php5.92 ▲0.0491.58 ▼9.09
Media Library /wp-admin/upload.php3.27 ▲0.0439.73 ▲2.72

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 17 new files
Database: 2 new tables, 6 new options
New tables
wp_wp_beautiful_charts_data
wp_wp_beautiful_charts
New WordPress options
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Beautiful Charts
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲6614.01 ▼0.182.01 ▲0.3741.37 ▼0.51
Dashboard /wp-admin2,193 ▲135.56 ▼0.1187.41 ▼8.1477.36 ▲34.00
Posts /wp-admin/edit.php2,113 ▲131.99 ▼0.0433.90 ▼4.7532.29 ▼8.41
Add New Post /wp-admin/post-new.php1,538 ▲1223.22 ▲0.20697.08 ▲0.18164.30 ▲110.54
Media Library /wp-admin/upload.php1,416 ▲164.22 ▲0.04101.13 ▼7.3777.71 ▲30.17

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

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

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/wp-beautiful-charts/wp-beautiful-charts.php:17

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 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Tags: Please reduce the number of tags, currently 23 tag instead of maximum 10
The official readme.txt might help

wp-beautiful-charts/wp-beautiful-charts.php 85% from 13 tests

This is the main PHP file of "WP Beautiful Charts" version 1.25, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Domain Path: Prefix the domain path with a forward slash character ("/")
  • Domain Path: Use only dashes and lowercase characters for the domain path ("")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin572 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP772431540
CSS15025
JavaScript2297

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
6 compressed PNG files occupy 0.01MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/remove.png1.27KB1.20KB▼ 5.76%
images/edit.png0.87KB0.87KB0.00%
images/help.png2.08KB1.69KB▼ 19.08%
images/chart.png0.59KB0.59KB0.00%
images/fb.png1.59KB1.00KB▼ 37.42%