84% chartplot

Code Review | Wordpress chart plugin - ChartPlot

WordPress plugin Wordpress chart plugin - ChartPlot scored 84% from 54 tests.

About plugin

  • Plugin page: chartplot
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.0
  • WordPress version: 6.3.1
  • First release: Feb 25, 2019
  • Latest release: Feb 26, 2019
  • Number of updates: 7
  • Update frequency: every 0.1 days
  • Top authors: chartplot (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 790 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.18MB] [CPU: ▼1.95ms] Passed 4 tests

An overview of server-side resources used by Wordpress chart plugin - ChartPlot
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1839.11 ▼2.98
Dashboard /wp-admin3.47 ▲0.1746.45 ▼7.42
Posts /wp-admin/edit.php3.59 ▲0.2351.04 ▲3.24
Add New Post /wp-admin/post-new.php6.08 ▲0.2095.46 ▼0.65
Media Library /wp-admin/upload.php3.40 ▲0.1742.08 ▲7.53
All Charts /wp-admin/edit.php?post_type=chartplot_chart4.6152.40
Add New /wp-admin/post-new.php?post_type=chartplot_chart3.5353.22
Tags /wp-admin/edit-tags.php?taxonomy=chartplot_chart_tags&post_type=chartplot_chart3.3935.33
Settings /wp-admin/edit.php?post_type=chartplot_chart&page=chartplot_chart_settings3.3633.20
Categories /wp-admin/edit-tags.php?taxonomy=chartplot_chart_categories&post_type=chartplot_chart3.3931.24

Server storage [IO: ▲6.96MB] [DB: ▲0.50MB] Passed 3 tests

Filesystem and database footprint
No storage issues were detected
Filesystem: 560 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
chartplot_examples_loaded

Browser metrics Passed 4 tests

A check of browser resources used by Wordpress chart plugin - ChartPlot
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,859 ▲12413.21 ▼1.171.67 ▼0.2239.54 ▼9.20
Dashboard /wp-admin2,266 ▲784.87 ▼1.04110.72 ▼1.7443.80 ▼0.52
Posts /wp-admin/edit.php2,154 ▲652.03 ▼0.0039.57 ▲5.6735.51 ▲0.21
Add New Post /wp-admin/post-new.php6,627 ▲5,09325.04 ▲2.05937.91 ▲219.3735.51 ▼17.52
Media Library /wp-admin/upload.php1,577 ▲1894.54 ▲0.34103.94 ▼11.0742.29 ▼11.34
All Charts /wp-admin/edit.php?post_type=chartplot_chart2,3012.0438.9032.82
Add New /wp-admin/post-new.php?post_type=chartplot_chart2,24714.80390.6542.87
Tags /wp-admin/edit-tags.php?taxonomy=chartplot_chart_tags&post_type=chartplot_chart1,2902.1426.4325.54
Settings /wp-admin/edit.php?post_type=chartplot_chart&page=chartplot_chart_settings8922.0529.3129.38
Categories /wp-admin/edit-tags.php?taxonomy=chartplot_chart_categories&post_type=chartplot_chart1,3152.1425.5225.16

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • chartplot_examples_loaded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check 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 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/chartplot/php/plugin.php:538

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 93% 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
These attributes need your attention:
  • Tags: Too many tags (13 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt is a good inspiration

chartplot/index.php 92% from 13 tests

The main file in "Wordpress chart plugin - ChartPlot" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("chartplot.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin66,556 lines of code in 511 files:
LanguageFilesBlank linesComment linesLines of code
TypeScript3907,3669,01137,172
JSON70019,918
Sass921,4991,0486,410
CSS41951191,642
JavaScript1369291541
PHP27412494
SVG200373
Bourne Shell1216

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity33.00
▷ Minimum class complexity33.00
▷ Maximum class complexity33.00
Average method complexity2.19
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods27
▷ Static methods00.00%
▷ Public methods27100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
28 PNG files occupy 0.37MB with 0.21MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/templates/line.png8.72KB3.57KB▼ 59.11%
img/templates/area_stacked.png7.12KB3.39KB▼ 52.31%
img/help/main/editor-full.png18.30KB8.80KB▼ 51.90%
img/help/main/main-menu-tooltip.png17.69KB7.97KB▼ 54.95%
img/templates/candle-volume.png3.17KB1.26KB▼ 60.08%