84% charts-for-tablepress-chartist

Code Review | TablePress Extension: Chartist

WordPress plugin TablePress Extension: Chartist scored84%from 54 tests.

About plugin

  • Plugin page: charts-for-tablep...
  • Plugin version: 0.10.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9-5.9.3
  • WordPress version: 6.3.1
  • First release: Jan 20, 2017
  • Latest release: Apr 21, 2022
  • Number of updates: 14
  • Update frequency: every 136.9 days
  • Top authors: silsha (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

1,000+ active /15,162 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼9.63ms] Passed 4 tests

Server-side resources used by TablePress Extension: Chartist
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0436.73 ▼9.93
Dashboard /wp-admin3.34 ▼0.0054.44 ▼17.07
Posts /wp-admin/edit.php3.39 ▲0.0449.56 ▼1.20
Add New Post /wp-admin/post-new.php5.92 ▲0.0487.29 ▼10.30
Media Library /wp-admin/upload.php3.26 ▲0.0338.70 ▲4.86

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for TablePress Extension: Chartist
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.35 ▼1.051.94 ▼0.1446.78 ▲1.25
Dashboard /wp-admin2,209 ▲244.85 ▼0.09102.55 ▼19.2240.71 ▼5.19
Posts /wp-admin/edit.php2,089 ▼01.97 ▼0.0835.50 ▼0.6433.59 ▼0.49
Add New Post /wp-admin/post-new.php1,524 ▲523.15 ▲0.09681.46 ▼5.2362.11 ▲7.04
Media Library /wp-admin/upload.php1,382 ▼64.19 ▼0.0797.02 ▼8.0242.35 ▼3.56

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
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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 output text when accessed directly:
    • > /wp-content/plugins/charts-for-tablepress-chartist/tablepress_chartist.php

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: tablepress, table, responsive, chart

charts-for-tablepress-chartist/tablepress_chartist.php 92% from 13 tests

The main PHP file in "TablePress Extension: Chartist" ver. 0.10.1 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("charts-for-tablepress-chartist.php" instead of "tablepress_chartist.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected3,521 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript24501,6422,406
CSS2671548
PHP131109250
Sass25329247
Markdown124070

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity30.00
▷ Minimum class complexity30.00
▷ Maximum class complexity30.00
Average method complexity5.83
▷ Minimum method complexity2.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods6100.00%
▷ Public methods583.33%
▷ Protected methods116.67%
▷ 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
No PNG files were detected