78% wha-area-charts

Code Review | Area Chart

WordPress plugin Area Chart scored78%from 54 tests.

About plugin

  • Plugin page: wha-area-charts
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.1-5.2.3
  • WordPress version: 6.3.1
  • First release: Oct 7, 2019
  • Latest release: Oct 7, 2019
  • Number of updates: 3
  • Update frequency: every 1.3 days
  • Top authors: webhelpagency (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /477 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 gracefully, with no errors

Server metrics [RAM: ▼0.60MB] [CPU: ▼15.92ms] Passed 4 tests

Analyzing server-side resources used by Area Chart
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1442.44 ▲0.42
Dashboard /wp-admin3.39 ▲0.0849.49 ▲1.73
Posts /wp-admin/edit.php3.44 ▲0.0852.29 ▲2.26
Add New Post /wp-admin/post-new.php3.22 ▼2.6637.06 ▼65.43
Media Library /wp-admin/upload.php3.31 ▲0.0838.12 ▼0.41
Add New /wp-admin/post-new.php?post_type=wha_areachart3.1734.91
All Charts /wp-admin/edit.php?post_type=wha_areachart3.3637.17

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 58 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Area Chart
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,169 ▲39815.22 ▲0.6133.93 ▲32.0438.44 ▼3.58
Dashboard /wp-admin2,227 ▲425.79 ▼0.09106.46 ▼1.9939.72 ▼3.11
Posts /wp-admin/edit.php2,113 ▲272.02 ▲0.0338.92 ▲0.3934.42 ▼0.71
Add New Post /wp-admin/post-new.php1,551 ▲3723.03 ▲5.46666.00 ▼25.1461.24 ▲4.37
Media Library /wp-admin/upload.php1,418 ▲334.21 ▼0.0194.27 ▼20.4343.41 ▼5.01
Add New /wp-admin/post-new.php?post_type=wha_areachart1,9644.66141.8687.97
All Charts /wp-admin/edit.php?post_type=wha_areachart1,0891.9833.2329.98

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
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
    • > GET request to /wp-admin/post-new.php?post_type=wha_areachart
    • > Notice in wp-content/plugins/wha-area-charts/wha-area-charts.php+266
    Undefined index: myplugin_noncename

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/wha-area-charts/res/admin/area_types/boundaries.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: graph, chart, area, areachart, line

wha-area-charts/wha-area-charts.php 85% from 13 tests

The main file in "Area Chart" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Domain Path: The domain path folder does not exist ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin10,815 lines of code in 44 files:
LanguageFilesBlank linesComment linesLines of code
SVG2002,679
CSS41021762,641
JavaScript74071811,831
Sass1434341,768
LESS1434441,758
PHP3352138

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
5 PNG files occupy 0.72MB with 0.44MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
res/image/banner-772x250.png181.11KB88.34KB▼ 51.22%
res/image/screenshot-1.png84.22KB38.14KB▼ 54.72%
res/image/screenshot-3.png321.45KB94.90KB▼ 70.48%
res/image/screenshot-2.png139.01KB50.40KB▼ 63.74%
res/image/icon-256x256.png15.79KB5.67KB▼ 64.08%