10% maxicharts-gravity-forms-source-add-on

Code Review | MaxiCharts Gravity Forms Source add-on

WordPress plugin MaxiCharts Gravity Forms Source add-on scored10%from 54 tests.

About plugin

  • Plugin page: maxicharts-gravit...
  • Plugin version: 1.7.10
  • 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: 149
  • Update frequency: every 10.3 days
  • Top authors: munger41 (84.56%)maxicharts (16.11%)

Code review

54 tests

User reviews

5 reviews

Install metrics

400+ active /14,524 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
These installer errors require your attention
  • The plugin cannot be installed
    • > Error in wp-content/plugins/maxicharts-gravity-forms-source-add-on/mcharts_gf_source_add_on.php+157
    Uncaught Error: Call to a member function error() on null in wp-content/plugins/maxicharts-gravity-forms-source-add-on/mcharts_gf_source_add_on.php:157
    Stack trace:
    #0 wp-content/plugins/maxicharts-gravity-forms-source-add-on/mcharts_gf_source_add_on.php(95): maxicharts_gravity_forms->checkGravityForms()
    #1 wp-content/plugins/maxicharts-gravity-forms-source-add-on/mcharts_gf_source_add_on.php(1989): maxicharts_gravity_forms->add_hooks()
    #2 wp-admin/includes/plugin.php(2318): include_once('/var/www/wordpr...')
    #3 wp-admin/includes/plugin.php(663): plugin_sandbox_scrape()

Server metrics [RAM: ▲0.00MB] [CPU: ▼7.78ms] Passed 4 tests

Server-side resources used by MaxiCharts Gravity Forms Source add-on
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0041.33 ▼3.94
Dashboard /wp-admin3.31 ▲0.0048.73 ▼4.48
Posts /wp-admin/edit.php3.36 ▲0.0051.20 ▲2.77
Add New Post /wp-admin/post-new.php5.89 ▲0.0088.44 ▼18.79
Media Library /wp-admin/upload.php3.23 ▲0.0035.49 ▼3.89

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 221 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for MaxiCharts Gravity Forms Source add-on
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.38 ▲0.001.99 ▲0.2145.32 ▼1.31
Dashboard /wp-admin2,195 ▲215.56 ▼0.0988.66 ▼15.0742.63 ▼3.34
Posts /wp-admin/edit.php2,097 ▼61.96 ▲0.0136.02 ▲1.0434.32 ▼5.42
Add New Post /wp-admin/post-new.php1,531 ▲323.15 ▲0.10666.43 ▲1.1657.91 ▼0.88
Media Library /wp-admin/upload.php1,403 ▲34.24 ▼0.1394.78 ▼23.0745.30 ▼2.92

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
Please fix the following items
  • 155× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\TestCase' not found in wp-content/plugins/maxicharts-gravity-forms-source-add-on/libs/vendor/monolog/monolog/tests/Monolog/Handler/ElasticSearchHandlerTest.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Formatter\ormalizerFormatter' not found in wp-content/plugins/maxicharts-gravity-forms-source-add-on/libs/vendor/monolog/monolog/src/Monolog/Formatter/HtmlFormatter.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\TestCase' not found in wp-content/plugins/maxicharts-gravity-forms-source-add-on/libs/vendor/monolog/monolog/tests/Monolog/Processor/GitProcessorTest.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\AbstractProcessingHandler' not found in wp-content/plugins/maxicharts-gravity-forms-source-add-on/libs/vendor/monolog/monolog/src/Monolog/Handler/LogglyHandler.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\TestCase' not found in wp-content/plugins/maxicharts-gravity-forms-source-add-on/libs/vendor/monolog/monolog/tests/Monolog/Handler/StreamHandlerTest.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Formatter\ormalizerFormatter' not found in wp-content/plugins/maxicharts-gravity-forms-source-add-on/libs/vendor/monolog/monolog/src/Monolog/Formatter/GelfMessageFormatter.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\TestCase' not found in wp-content/plugins/maxicharts-gravity-forms-source-add-on/libs/vendor/monolog/monolog/tests/Monolog/Formatter/JsonFormatterTest.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\SocketHandler' not found in wp-content/plugins/maxicharts-gravity-forms-source-add-on/libs/vendor/monolog/monolog/src/Monolog/Handler/HipChatHandler.php:29
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\SocketHandler' not found in wp-content/plugins/maxicharts-gravity-forms-source-add-on/libs/vendor/monolog/monolog/src/Monolog/Handler/FleepHookHandler.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\MailHandler' not found in wp-content/plugins/maxicharts-gravity-forms-source-add-on/libs/vendor/monolog/monolog/src/Monolog/Handler/NativeMailerHandler.php:23

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 83% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention: You can take inspiration from this readme.txt

maxicharts-gravity-forms-source-add-on/mcharts_gf_source_add_on.php 77% from 13 tests

The principal PHP file in "MaxiCharts Gravity Forms Source add-on" v. 1.7.10 is loaded by WordPress automatically on each request
The following require your attention:
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist
  • Main file name: The principal plugin file should be the same as the plugin slug ("maxicharts-gravity-forms-source-add-on.php" instead of "mcharts_gf_source_add_on.php")
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin16,936 lines of code in 213 files:
LanguageFilesBlank linesComment linesLines of code
PHP1993,5617,63715,817
Markdown82320766
JSON500337
XML13016

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity7.09
▷ Minimum class complexity1.00
▷ Maximum class complexity312.00
Average method complexity2.05
▷ Minimum method complexity1.00
▷ Maximum method complexity98.00
Code structure
Namespaces17
Interfaces5
Traits7
Classes195
▷ Abstract classes84.10%
▷ Concrete classes18795.90%
▷ Final classes00.00%
Methods1,254
▷ Static methods413.27%
▷ Public methods97777.91%
▷ Protected methods20416.27%
▷ Private methods735.82%
Functions90
▷ Named functions910.00%
▷ Anonymous functions8190.00%
Constants61
▷ Global constants23.28%
▷ Class constants5996.72%
▷ 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