84% maxicharts-d3js-add-on

Code Review | MaxiCharts D3js

WordPress plugin MaxiCharts D3js scored 84% from 54 tests.

About plugin

  • Plugin page: maxicharts-d3js-a...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.8
  • WordPress version: 6.3.1
  • First release: Apr 25, 2019
  • Latest release: Sep 20, 2021
  • Number of updates: 17
  • Update frequency: every 51.8 days
  • Top authors: maxicharts (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,201 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼5.33ms] Passed 4 tests

A check of server-side resources used by MaxiCharts D3js
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.41 ▼0.0524.57 ▼13.65
Dashboard /wp-admin3.34 ▲0.0444.05 ▼7.61
Posts /wp-admin/edit.php3.39 ▲0.0347.34 ▲5.90
Add New Post /wp-admin/post-new.php5.92 ▲0.0397.92 ▲1.16
Media Library /wp-admin/upload.php3.26 ▲0.0331.35 ▼1.22
All Network Nodes /wp-admin/edit.php?post_type=mchartsn_node3.3134.29
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=mchartsn_node3.2633.25
Add New /wp-admin/post-new.php?post_type=mchartsn_node3.4857.92
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=mchartsn_node3.2636.44

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 970 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
category_children
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

MaxiCharts D3js: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,500 ▼23513.29 ▼1.380.68 ▼1.2218.19 ▼26.55
Dashboard /wp-admin2,241 ▲534.82 ▼0.05107.54 ▼8.6740.88 ▼5.74
Posts /wp-admin/edit.php2,131 ▲422.11 ▲0.1242.10 ▲6.6532.17 ▼0.21
Add New Post /wp-admin/post-new.php1,543 ▼017.68 ▼0.53645.87 ▼6.1261.80 ▲15.44
Media Library /wp-admin/upload.php1,423 ▲414.29 ▲0.1094.23 ▼5.5542.31 ▼0.92
All Network Nodes /wp-admin/edit.php?post_type=mchartsn_node1,1762.0130.2429.68
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=mchartsn_node1,3422.1327.1228.48
Add New /wp-admin/post-new.php?post_type=mchartsn_node2,7337.94173.0167.26
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=mchartsn_node1,4782.1427.2530.64

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
Please fix the following items
  • The uninstall procedure has failed, leaving 7 options in the database
    • category_children
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 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
Please fix the following
  • 6× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Interface 'BlueM\\Tree\\Serializer\\TreeJsonSerializerInterface' not found in wp-content/plugins/maxicharts-d3js-add-on/libs/vendor/bluem/tree/src/Tree/Serializer/FlatTreeJsonSerializer.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/maxicharts-d3js-add-on/libs/vendor/bluem/tree/tests/TreeTest.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/maxicharts-d3js-add-on/libs/vendor/bluem/tree/tests/Tree/Serializer/HierarchicalTreeJsonSerializerTest.php:16
    • > PHP Fatal error
      Uncaught Error: Interface 'BlueM\\Tree\\Serializer\\TreeJsonSerializerInterface' not found in wp-content/plugins/maxicharts-d3js-add-on/libs/vendor/bluem/tree/src/Tree/Serializer/HierarchicalTreeJsonSerializer.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/maxicharts-d3js-add-on/libs/vendor/bluem/tree/tests/Tree/NodeTest.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/maxicharts-d3js-add-on/libs/vendor/bluem/tree/tests/Tree/Serializer/FlatTreeJsonSerializerTest.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues 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
7 plugin tags: documents, js, driven, d3, maxicharts...

maxicharts-d3js-add-on/maxicharts-d3js.php 92% from 13 tests

"MaxiCharts D3js" version 1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("maxicharts-d3js-add-on.php" instead of "maxicharts-d3js.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
Everything looks great! No dangerous files found in this plugin71,066 lines of code in 822 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript6179,3622,71153,373
Markdown434,94909,098
JSON137006,495
PHP194569561,876
CSS1211081
TypeScript23822670
Bourne Again Shell15048
XML10215
YAML13110

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity10.56
▷ Minimum class complexity1.00
▷ Maximum class complexity50.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces5
Interfaces1
Traits0
Classes15
▷ Abstract classes00.00%
▷ Concrete classes15100.00%
▷ Final classes00.00%
Methods151
▷ Static methods53.31%
▷ Public methods13891.39%
▷ Protected methods53.31%
▷ Private methods85.30%
Functions5
▷ Named functions240.00%
▷ Anonymous functions360.00%
Constants2
▷ Global constants150.00%
▷ Class constants150.00%
▷ Public constants1100.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