78% wpgo-power-charts-lite

Code Review | Power Charts - Responsive Beautiful Charts & Graphs

WordPress plugin Power Charts - Responsive Beautiful Charts & Graphs scored 78% from 54 tests.

About plugin

  • Plugin page: wpgo-power-charts...
  • Plugin version: 0.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9
  • WordPress version: 6.3.1
  • First release: Sep 27, 2017
  • Latest release: Sep 27, 2017
  • Number of updates: 6
  • Update frequency: N/A
  • Top authors: dgwyer (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active / 3,056 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 successfully, without throwing any errors or notices

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

A check of server-side resources used by Power Charts - Responsive Beautiful Charts & Graphs
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0540.93 ▲1.42
Dashboard /wp-admin3.12 ▼0.1925.55 ▼23.57
Posts /wp-admin/edit.php3.42 ▲0.0645.93 ▼1.05
Add New Post /wp-admin/post-new.php5.95 ▲0.0694.53 ▲3.99
Media Library /wp-admin/upload.php3.18 ▼0.0425.23 ▼6.61
Help & Info /wp-admin/edit.php?post_type=wpgo_power_charts&page=wpgo-power-charts-about-page3.1024.66
Add New Chart /wp-admin/post-new.php?post_type=wpgo_power_charts3.3039.24
All Charts /wp-admin/edit.php?post_type=wpgo_power_charts3.2327.95

Server storage [IO: ▲0.35MB] [DB: ▲0.07MB] Passed 3 tests

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

Browser metrics Passed 4 tests

An overview of browser requirements for Power Charts - Responsive Beautiful Charts & Graphs
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,861 ▲10413.13 ▼1.051.98 ▼0.1843.21 ▼1.14
Dashboard /wp-admin2,239 ▲545.87 ▲0.97108.10 ▼4.2643.39 ▲3.41
Posts /wp-admin/edit.php2,122 ▲362.00 ▼0.0039.00 ▲3.5734.91 ▲2.91
Add New Post /wp-admin/post-new.php1,544 ▲2317.71 ▼5.40636.77 ▼19.9547.88 ▼3.44
Media Library /wp-admin/upload.php1,421 ▲334.22 ▲0.0295.12 ▼4.1744.26 ▼1.07
Help & Info /wp-admin/edit.php?post_type=wpgo_power_charts&page=wpgo-power-charts-about-page9232.0223.7869.89
Add New Chart /wp-admin/post-new.php?post_type=wpgo_power_charts2,6094.2790.21104.59
All Charts /wp-admin/edit.php?post_type=wpgo_power_charts1,1222.0032.7730.30

Uninstaller [IO: ▲0.00MB] [DB: ▲0.08MB] 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-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These errors were triggered by the plugin
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=wpgo_power_charts
    • > Notice in wp-content/plugins/wpgo-power-charts-lite/classes/power-charts-enqueue-scripts.php+56
    Trying to get property 'ID' of non-object
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=wpgo_power_charts
    • > Notice in wp-content/plugins/wpgo-power-charts-lite/classes/power-charts-enqueue-scripts.php+65
    Trying to get property 'post_type' of non-object
    • > GET request to /wp-admin/post-new.php?post_type=wpgo_power_charts
    • > Warning in wp-content/plugins/wpgo-power-charts-lite/classes/power-charts-cpt.php+390
    Illegal string offset 'wpgo_power_charts_series_color_1'
  • 20 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=wpgo_power_charts
    • > Notice in wp-content/plugins/wpgo-power-charts-lite/classes/power-charts-cpt.php+390
    Uninitialized string offset: 0
    • > GET request to /wp-admin/post-new.php?post_type=wpgo_power_charts
    • > Warning in wp-content/plugins/wpgo-power-charts-lite/classes/power-charts-cpt.php+390
    Illegal string offset 'wpgo_power_charts_series_color_2'
    • > GET request to /wp-admin/post-new.php?post_type=wpgo_power_charts
    • > Warning in wp-content/plugins/wpgo-power-charts-lite/classes/power-charts-cpt.php+390
    Illegal string offset 'wpgo_power_charts_series_color_3'
    • > GET request to /wp-admin/post-new.php?post_type=wpgo_power_charts
    • > Warning in wp-content/plugins/wpgo-power-charts-lite/classes/power-charts-cpt.php+390
    Illegal string offset 'wpgo_power_charts_series_color_4'
    • > GET request to /wp-admin/post-new.php?post_type=wpgo_power_charts
    • > Warning in wp-content/plugins/wpgo-power-charts-lite/classes/power-charts-cpt.php+390
    Illegal string offset 'wpgo_power_charts_series_color_5'
    • > GET request to /wp-admin/post-new.php?post_type=wpgo_power_charts
    • > Warning in wp-content/plugins/wpgo-power-charts-lite/classes/power-charts-cpt.php+390
    Illegal string offset 'wpgo_power_charts_series_color_6'
    • > GET request to /wp-admin/post-new.php?post_type=wpgo_power_charts
    • > Warning in wp-content/plugins/wpgo-power-charts-lite/classes/power-charts-cpt.php+390
    Illegal string offset 'wpgo_power_charts_series_color_7'
    • > GET request to /wp-admin/post-new.php?post_type=wpgo_power_charts
    • > Warning in wp-content/plugins/wpgo-power-charts-lite/classes/power-charts-cpt.php+390
    Illegal string offset 'wpgo_power_charts_series_color_8'
    • > GET request to /wp-admin/post-new.php?post_type=wpgo_power_charts
    • > Warning in wp-content/plugins/wpgo-power-charts-lite/classes/power-charts-cpt.php+390
    Illegal string offset 'wpgo_power_charts_series_color_9'
    • > GET request to /wp-admin/post-new.php?post_type=wpgo_power_charts
    • > Warning in wp-content/plugins/wpgo-power-charts-lite/classes/power-charts-cpt.php+390
    Illegal string offset 'wpgo_power_charts_series_color_10'
    • > GET request to /wp-admin/post-new.php?post_type=wpgo_power_charts
    • > Warning in wp-content/plugins/wpgo-power-charts-lite/classes/power-charts-cpt.php+390
    Illegal string offset 'wpgo_power_charts_series_color_11'
    • > GET request to /wp-admin/post-new.php?post_type=wpgo_power_charts
    • > Warning in wp-content/plugins/wpgo-power-charts-lite/classes/power-charts-cpt.php+390
    Illegal string offset 'wpgo_power_charts_series_color_12'
    • > GET request to /wp-admin/post-new.php?post_type=wpgo_power_charts
    • > Warning in wp-content/plugins/wpgo-power-charts-lite/classes/power-charts-cpt.php+390
    Illegal string offset 'wpgo_power_charts_series_color_13'
    • > GET request to /wp-admin/post-new.php?post_type=wpgo_power_charts
    • > Warning in wp-content/plugins/wpgo-power-charts-lite/classes/power-charts-cpt.php+390
    Illegal string offset 'wpgo_power_charts_series_color_14'
    • > GET request to /wp-admin/post-new.php?post_type=wpgo_power_charts
    • > Warning in wp-content/plugins/wpgo-power-charts-lite/classes/power-charts-cpt.php+390
    Illegal string offset 'wpgo_power_charts_series_color_15'
    • > GET request to /wp-admin/post-new.php?post_type=wpgo_power_charts
    • > Warning in wp-content/plugins/wpgo-power-charts-lite/classes/power-charts-cpt.php+390
    Illegal string offset 'wpgo_power_charts_series_color_16'
    • > GET request to /wp-admin/post-new.php?post_type=wpgo_power_charts
    • > Warning in wp-content/plugins/wpgo-power-charts-lite/classes/power-charts-cpt.php+390
    Illegal string offset 'wpgo_power_charts_series_color_17'
    • > GET request to /wp-admin/post-new.php?post_type=wpgo_power_charts
    • > Warning in wp-content/plugins/wpgo-power-charts-lite/classes/power-charts-cpt.php+390
    Illegal string offset 'wpgo_power_charts_series_color_18'
    • > GET request to /wp-admin/post-new.php?post_type=wpgo_power_charts
    • > Warning in wp-content/plugins/wpgo-power-charts-lite/classes/power-charts-cpt.php+390
    Illegal string offset 'wpgo_power_charts_series_color_19'
    • > GET request to /wp-admin/post-new.php?post_type=wpgo_power_charts
    • > Warning in wp-content/plugins/wpgo-power-charts-lite/classes/power-charts-cpt.php+390
    Illegal string offset 'wpgo_power_charts_series_color_20'
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=wpgo_power_charts
    • > Warning in wp-content/plugins/wpgo-power-charts-lite/classes/power-charts-cpt.php+530
    Use of undefined constant uri - assumed 'uri' (this will throw an Error in a future version of PHP)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=wpgo_power_charts
    • > Notice in wp-content/plugins/wpgo-power-charts-lite/classes/power-charts-cpt.php+583
    Undefined variable: w

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
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 plugin_dir_path() in wp-content/plugins/wpgo-power-charts-lite/power-charts.php:106

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

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
10 plugin tags: data, column chart, visualisation, responsive, d3...

wpgo-power-charts-lite/power-charts.php 92% from 13 tests

"Power Charts - Responsive Beautiful Charts & Graphs" version 0.1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wpgo-power-charts-lite.php" instead of "power-charts.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin1,959 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP8307566958
JavaScript9187172728
CSS44738187
Markdown125086

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity8.38
▷ Minimum class complexity1.00
▷ Maximum class complexity48.00
Average method complexity1.97
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods61
▷ Static methods34.92%
▷ Public methods61100.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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
js/alpha-color-picker/transparency-grid.png2.58KB2.80KB0.00%