10% maxicharts

Code Review | MaxiCharts

WordPress plugin MaxiCharts scored10%from 54 tests.

About plugin

  • Plugin page: maxicharts
  • Plugin version: 1.7.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.8
  • WordPress version: 6.3.1
  • First release: Jul 13, 2017
  • Latest release: Sep 20, 2021
  • Number of updates: 231
  • Update frequency: every 6.6 days
  • Top authors: munger41 (80.09%)maxicharts (20.35%)

Code review

54 tests

User reviews

9 reviews

Install metrics

500+ active /19,106 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
These installer errors require your attention
  • This plugin did not install gracefully
    • > Notice in wp-content/plugins/maxicharts/maxicharts.php+192
    Trying to access array offset on value of type bool

Server metrics [RAM: ▼1.85MB] [CPU: ▼50.55ms] Passed 4 tests

An overview of server-side resources used by MaxiCharts
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.13 ▼1.335.24 ▼32.74
Dashboard /wp-admin2.15 ▼1.1511.21 ▼40.25
Posts /wp-admin/edit.php2.15 ▼1.208.37 ▼40.10
Add New Post /wp-admin/post-new.php2.15 ▼3.735.94 ▼89.11
Media Library /wp-admin/upload.php2.15 ▼1.086.82 ▼27.13
MaxiCharts /wp-admin/options-general.php?page=maxicharts-setting-admin2.156.96

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

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

Browser metrics Passed 4 tests

Checking browser requirements for MaxiCharts
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,912 ▲15114.26 ▼0.2812.16 ▲10.7140.64 ▲3.40
Dashboard /wp-admin2,196 ▲165.51 ▼0.1988.78 ▼4.5037.67 ▼6.45
Posts /wp-admin/edit.php2,104 ▲41.97 ▼0.0639.60 ▲2.7037.16 ▲2.30
Add New Post /wp-admin/post-new.php1,531 ▼423.06 ▲4.71664.91 ▲41.4253.76 ▼1.28
Media Library /wp-admin/upload.php1,404 ▲44.22 ▼0.0295.25 ▼4.9740.21 ▼4.44
MaxiCharts /wp-admin/options-general.php?page=maxicharts-setting-admin7972.0023.2827.44

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/maxicharts/maxicharts.php+192
    Trying to access array offset on value of type bool
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=maxicharts-setting-admin
    • > Notice in wp-content/plugins/maxicharts/maxicharts.php+192
    Trying to access array offset on value of type bool

SRP 0% 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
Almost there! Just fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/maxicharts/libs/vendor/apache/log4php/package.php
  • 66× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'LoggerConfigurable' not found in wp-content/plugins/maxicharts/libs/vendor/apache/log4php/src/main/php/LoggerFilter.php:56
    • > PHP Fatal error
      Uncaught Error: Class 'LoggerPatternConverterSuperglobal' not found in wp-content/plugins/maxicharts/libs/vendor/apache/log4php/src/main/php/pattern/LoggerPatternConverterSession.php:33
    • > PHP Fatal error
      Uncaught Error: Class 'LoggerPatternConverter' not found in wp-content/plugins/maxicharts/libs/vendor/apache/log4php/src/main/php/pattern/LoggerPatternConverterDate.php:35
    • > PHP Fatal error
      Uncaught Error: Interface 'LoggerConfigurationAdapter' not found in wp-content/plugins/maxicharts/libs/vendor/apache/log4php/src/main/php/configurators/LoggerConfigurationAdapterXML.php:30
    • > PHP Fatal error
      Uncaught Error: Interface 'LoggerConfigurationAdapter' not found in wp-content/plugins/maxicharts/libs/vendor/apache/log4php/src/main/php/configurators/LoggerConfigurationAdapterINI.php:33
    • > PHP Fatal error
      Uncaught Error: Class 'LoggerAppender' not found in wp-content/plugins/maxicharts/libs/vendor/apache/log4php/src/main/php/appenders/LoggerAppenderSocket.php:37
    • > PHP Fatal error
      Uncaught Error: Class 'LoggerLayout' not found in wp-content/plugins/maxicharts/libs/vendor/apache/log4php/src/main/php/layouts/LoggerLayoutTTCC.php:54
    • > PHP Fatal error
      Uncaught Error: Class 'LoggerAppender' not found in wp-content/plugins/maxicharts/libs/vendor/apache/log4php/src/main/php/appenders/LoggerAppenderMailEvent.php:43
    • > PHP Fatal error
      Uncaught Error: Class 'LoggerPatternConverter' not found in wp-content/plugins/maxicharts/libs/vendor/apache/log4php/src/main/php/pattern/LoggerPatternConverterLiteral.php:29
    • > PHP Fatal error
      Uncaught Error: Class 'LoggerConfigurable' not found in wp-content/plugins/maxicharts/libs/vendor/apache/log4php/src/main/php/LoggerAppender.php:27

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Screenshots: These screenshots need descriptions #4, #5 in maxicharts/assets to your readme.txt
  • Tags: You are using too many tags: 27 tag instead of maximum 10
Please take inspiration from this readme.txt

maxicharts/maxicharts.php Passed 13 tests

This is the main PHP file of "MaxiCharts" version 1.7.6, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
122 characters long description:
Create beautiful interactive HTML5 charts from Gravity Forms / CSV into your posts with a simple shortcode. Uses chart.js.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin97,768 lines of code in 581 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript39710,7677,52083,860
PHP1171,9497,6117,889
HTML1213101,947
JSON20001,362
Markdown1758001,200
TypeScript4166281598
Maven13021305
XML51772247
Ant11930140
CSS41421134
DTD1255469
YAML21017

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity9.59
▷ Minimum class complexity1.00
▷ Maximum class complexity227.00
Average method complexity2.15
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces9
Interfaces5
Traits7
Classes99
▷ Abstract classes99.09%
▷ Concrete classes9090.91%
▷ Final classes00.00%
Methods720
▷ Static methods8011.11%
▷ Public methods60884.44%
▷ Protected methods608.33%
▷ Private methods527.22%
Functions22
▷ Named functions313.64%
▷ Anonymous functions1986.36%
Constants64
▷ Global constants57.81%
▷ Class constants5992.19%
▷ Public constants59100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected