78% goo-pie-chart

Code Review | Goo Pie Chart

WordPress plugin Goo Pie Chart scored78%from 54 tests.

About plugin

  • Plugin page: goo-pie-chart
  • Plugin version: 1.1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.7.3
  • WordPress version: 6.3.1
  • First release: Aug 1, 2016
  • Latest release: Mar 26, 2017
  • Number of updates: 6
  • Update frequency: every 39.5 days
  • Top authors: Gunar (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active /3,384 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.11MB] [CPU: ▲2.20ms] 75% from 4 tests

Server-side resources used by Goo Pie Chart
Please fix the following
  • CPU: You should keep total CPU usage under 500.00ms (currently 694.99ms on /wp-admin/admin.php?page=goo-tools-plugin-settings)
PageMemory (MB)CPU Time (ms)
Home /3.83 ▲0.1048.48 ▲6.87
Dashboard /wp-admin3.68 ▲0.1253.87 ▼1.93
Posts /wp-admin/edit.php3.79 ▲0.1249.42 ▼3.45
Add New Post /wp-admin/post-new.php6.26 ▲0.11119.49 ▲23.09
Media Library /wp-admin/upload.php3.60 ▲0.1146.06 ▲7.30
Goo Tools Plugins /wp-admin/admin.php?page=goo-tools-plugin-settings3.60694.99
Goo Pie Chart /wp-admin/admin.php?page=goo-piechart-plugin-settings3.5734.01

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 17 new files
Database: no new tables, 7 new options
New WordPress options
goopiechart_options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Goo Pie Chart
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,899 ▲11313.41 ▼0.828.90 ▲7.0943.82 ▲0.34
Dashboard /wp-admin2,222 ▲425.65 ▼0.0388.73 ▼2.6741.90 ▲2.66
Posts /wp-admin/edit.php2,124 ▲211.99 ▲0.0135.30 ▼4.5234.10 ▼1.06
Add New Post /wp-admin/post-new.php1,567 ▲4123.11 ▲5.51760.39 ▲100.9955.10 ▼13.99
Media Library /wp-admin/upload.php1,424 ▲214.21 ▼0.05109.97 ▲6.5745.92 ▼1.75
Goo Tools Plugins /wp-admin/admin.php?page=goo-tools-plugin-settings8262.0223.3626.47
Goo Pie Chart /wp-admin/admin.php?page=goo-piechart-plugin-settings1,2462.0322.4833.34

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/admin.php?page=goo-tools-plugin-settings
    • > Warning in wp-content/plugins/goo-pie-chart/goo_tools.php+37
    Invalid argument supplied for foreach()

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
  • 3× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/goo-pie-chart/goo_tools.php
    • > /wp-content/plugins/goo-pie-chart/goo-pie-chart.php
    • > /wp-content/plugins/goo-pie-chart/admin.php

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 88% 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
Attributes that need to be fixed:
  • Tags: Too many tags (15 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Screenshots: These screenshots do not have images: #1 (Plugin settings page), #2 (Pie Chart in action), #3 (v1.1.5 new options)
You can take inspiration from this readme.txt

goo-pie-chart/goo-pie-chart.php Passed 13 tests

The entry point to "Goo Pie Chart" version 1.1.5 is a PHP file that has certain tags in its header comment area
84 characters long description:
Insert animated pie chart graph to your post or page. Boost your data visualisation.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin990 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP315752639
JavaScript2933244
CSS2180107

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity61.00
▷ Minimum class complexity61.00
▷ Maximum class complexity61.00
Average method complexity8.50
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods562.50%
▷ Protected methods00.00%
▷ Private methods337.50%
Functions11
▷ Named functions11100.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
9 PNG files occupy 0.18MB with 0.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/g_dot.png0.18KB0.14KB▼ 21.69%
admin/stared_m.png9.19KB4.00KB▼ 56.51%
screenshot-1.png68.26KB38.20KB▼ 44.05%
screenshot-3.png77.39KB43.56KB▼ 43.72%
screenshot-2.png21.49KB8.38KB▼ 61.01%