74% charty

Code Review | google geographic charts and maps

WordPress plugin google geographic charts and maps scored74%from 54 tests.

About plugin

  • Plugin page: charty
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.6.1
  • WordPress version: 6.3.1
  • First release: Nov 7, 2016
  • Latest release: Nov 21, 2016
  • Number of updates: 16
  • Update frequency: every 1.8 days
  • Top authors: schrax (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,184 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.88MB] [CPU: ▼33.58ms] Passed 4 tests

An overview of server-side resources used by google geographic charts and maps
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0445.02 ▲2.12
Dashboard /wp-admin3.06 ▼0.2422.37 ▼30.36
Posts /wp-admin/edit.php3.06 ▼0.2926.13 ▼22.32
Add New Post /wp-admin/post-new.php3.06 ▼2.8332.09 ▼68.34
Media Library /wp-admin/upload.php3.06 ▼0.1725.05 ▼13.28
Settings /wp-admin/edit.php?post_type=charty&page=charty-config-menu3.0624.16
Add new /wp-admin/post-new.php?post_type=charty3.0630.72
All charts /wp-admin/edit.php?post_type=charty3.0626.21

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

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

Browser metrics Passed 4 tests

Checking browser requirements for google geographic charts and maps
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,857 ▲9614.71 ▲0.335.16 ▲3.3043.87 ▲0.44
Dashboard /wp-admin2,229 ▲615.57 ▼0.0788.89 ▲0.1979.04 ▲35.63
Posts /wp-admin/edit.php2,134 ▲372.00 ▼0.0035.52 ▼1.8332.99 ▼0.35
Add New Post /wp-admin/post-new.php1,564 ▲1923.10 ▼0.46744.40 ▲66.6259.12 ▲3.23
Media Library /wp-admin/upload.php1,434 ▲404.25 ▲0.02102.31 ▲0.4284.24 ▲34.66
Settings /wp-admin/edit.php?post_type=charty&page=charty-config-menu8772.0324.9732.12
Add new /wp-admin/post-new.php?post_type=charty3,2962.5549.9062.68
All charts /wp-admin/edit.php?post_type=charty1,1101.9332.0132.53

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/charty/inc/ChartyConfigMenu.php+94
    Undefined index: charty_export_csv_nonce
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=charty
    • > POST request to /wp-admin/admin-ajax.php
    • > Notice in wp-content/plugins/charty/inc/ChartyConfigMenu.php+94
    Undefined index: charty_export_csv_nonce
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=charty
    • > POST request to /wp-admin/admin-ajax.php
    • > Notice in wp-content/plugins/charty/inc/ChartyConfigMenu.php+69
    Undefined index: default_google_maps_api_key_nonce
    • > GET request to /wp-admin/post-new.php?post_type=charty
    • > Notice in wp-content/plugins/charty/charty.php+483
    Undefined index: charty_meta_box_nonce

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
8 plugin tags: graphs, graph, chart, geocharts, geochart...

charty/charty.php 92% from 13 tests

The primary PHP file in "google geographic charts and maps" version 1.2 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Description: Please don't use more than 140 characters for the plugin description (currently 175 characters long)

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 plugin1,441 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP510299975
JavaScript31425202
PO File1722164
CSS175100

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity13.33
▷ Minimum class complexity5.00
▷ Maximum class complexity27.00
Average method complexity2.48
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods25
▷ Static methods14.00%
▷ Public methods25100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/Charty-big.png7.93KB2.67KB▼ 66.38%
assets/charty.png1.32KB1.04KB▼ 21.05%