83% charts-ninja-graphs-and-charts

Code Review | Charts Ninja: Create Beautiful Graphs & Charts and Easily Add Them to Your Website

WordPress plugin Charts Ninja: Create Beautiful Graphs & Charts and Easily Add Them to Your Website scored83%from 54 tests.

About plugin

  • Plugin page: charts-ninja-grap...
  • Plugin version: 2.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.4.1
  • WordPress version: 6.3.1
  • First release: Dec 26, 2013
  • Latest release: May 12, 2020
  • Number of updates: 9
  • Update frequency: every 258.8 days
  • Top authors: CommonNinja (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /9,797 total downloads


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
Install script ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▲0.06ms] Passed 4 tests

This is a short check of server-side resources used by Charts Ninja: Create Beautiful Graphs & Charts and Easily Add Them to Your Website
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0039.44 ▲3.35
Dashboard /wp-admin3.31 ▼0.0446.09 ▼9.78
Posts /wp-admin/edit.php3.36 ▲0.0048.77 ▲4.91
Add New Post /wp-admin/post-new.php5.89 ▲0.0093.57 ▲6.49
Media Library /wp-admin/upload.php3.23 ▲0.0037.75 ▲1.77

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

An overview of browser requirements for Charts Ninja: Create Beautiful Graphs & Charts and Easily Add Them to Your Website
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.31 ▼1.111.78 ▲0.1539.06 ▼1.67
Dashboard /wp-admin2,209 ▲245.88 ▲0.0096.30 ▼4.2937.85 ▼2.53
Posts /wp-admin/edit.php2,092 ▲62.01 ▼0.0138.94 ▲3.2534.93 ▲2.60
Add New Post /wp-admin/post-new.php1,542 ▲1418.48 ▼4.55662.07 ▼60.1058.31 ▼8.57
Media Library /wp-admin/upload.php1,382 ▼64.20 ▼0.0296.46 ▼1.6541.71 ▼1.66

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
Please fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/charts-ninja-graphs-and-charts/chartsninja.php:37

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found


Plugin configuration 87% 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
These attributes need your attention: The official readme.txt might help

charts-ninja-graphs-and-charts/chartsninja.php 85% from 13 tests

"Charts Ninja: Create Beautiful Graphs & Charts and Easily Add Them to Your Website" version 2.1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 160 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("charts-ninja-graphs-and-charts.php" instead of "chartsninja.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
Everything looks great! No dangerous files found in this plugin47 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.00
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
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions1100.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
js/chartsninja.png3.24KB0.53KB▼ 83.67%