83% maxicharts-csv-source-add-on

Code Review | MaxiCharts CSV Source add-on

WordPress plugin MaxiCharts CSV Source add-on scored83%from 54 tests.

About plugin

  • Plugin page: maxicharts-csv-so...
  • Plugin version: 1.3.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.8
  • WordPress version: 6.3.1
  • First release: Jun 22, 2017
  • Latest release: Sep 20, 2021
  • Number of updates: 61
  • Update frequency: every 25.4 days
  • Top authors: munger41 (96.72%)maxicharts (4.92%)

Code review

54 tests

User reviews

2 reviews

Install metrics

60+ active /2,625 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.13MB] [CPU: ▼2.55ms] Passed 4 tests

Server-side resources used by MaxiCharts CSV Source add-on
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1343.17 ▲0.82
Dashboard /wp-admin3.43 ▲0.1354.37 ▲1.82
Posts /wp-admin/edit.php3.55 ▲0.1952.49 ▲1.59
Add New Post /wp-admin/post-new.php6.01 ▲0.1386.87 ▼12.38
Media Library /wp-admin/upload.php3.36 ▲0.1338.60 ▼0.23

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for MaxiCharts CSV Source add-on
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5414.48 ▲0.311.88 ▼0.0441.80 ▲0.04
Dashboard /wp-admin2,218 ▲185.77 ▼0.13102.92 ▲0.2137.98 ▼1.88
Posts /wp-admin/edit.php2,100 ▼02.04 ▲0.0336.96 ▲0.6233.94 ▼1.11
Add New Post /wp-admin/post-new.php1,545 ▼023.23 ▲0.11676.94 ▼6.6255.92 ▲2.62
Media Library /wp-admin/upload.php1,400 ▼04.19 ▲0.0895.52 ▼11.4643.55 ▼2.48

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

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
The following issues need your attention
  • 156× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\TestCase' not found in wp-content/plugins/maxicharts-csv-source-add-on/libs/vendor/monolog/monolog/tests/Monolog/Processor/TagProcessorTest.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\TestCase' not found in wp-content/plugins/maxicharts-csv-source-add-on/libs/vendor/monolog/monolog/tests/Monolog/Processor/MemoryUsageProcessorTest.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/maxicharts-csv-source-add-on/libs/vendor/monolog/monolog/tests/Monolog/Handler/SyslogHandlerTest.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\TestCase' not found in wp-content/plugins/maxicharts-csv-source-add-on/libs/vendor/monolog/monolog/tests/Monolog/Handler/NativeMailerHandlerTest.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\TestCase' not found in wp-content/plugins/maxicharts-csv-source-add-on/libs/vendor/monolog/monolog/tests/Monolog/Handler/SwiftMailerHandlerTest.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\AbstractProcessingHandler' not found in wp-content/plugins/maxicharts-csv-source-add-on/libs/vendor/monolog/monolog/src/Monolog/Handler/AmqpHandler.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\TestCase' not found in wp-content/plugins/maxicharts-csv-source-add-on/libs/vendor/monolog/monolog/tests/Monolog/Handler/AmqpHandlerTest.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'League\\Csv\\AbstractCsv' not found in wp-content/plugins/maxicharts-csv-source-add-on/libs/vendor/league/csv/src/Writer.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\AbstractProcessingHandler' not found in wp-content/plugins/maxicharts-csv-source-add-on/libs/vendor/monolog/monolog/src/Monolog/Handler/IFTTTHandler.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'League\\Csv\\AbstractCsv' not found in wp-content/plugins/maxicharts-csv-source-add-on/libs/vendor/league/csv/src/Reader.php:36

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

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Requires php: Version not formatted correctly
  • Tags: Too many tags (23 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can look at the official readme.txt

maxicharts-csv-source-add-on/mcharts_csv_source_add_on.php 77% from 13 tests

The entry point to "MaxiCharts CSV Source add-on" version 1.3.2 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("maxicharts-csv-source-add-on.php" instead of "mcharts_csv_source_add_on.php")
  • Domain Path: The domain path points to a folder that does not exist ("/languages")
  • Text Domain: Please use dashes and lowercase characters for text domains

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin17,536 lines of code in 231 files:
LanguageFilesBlank linesComment linesLines of code
PHP2163,8089,06015,825
Markdown958201,328
JSON500367
XML13016

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity6.00
▷ Minimum class complexity1.00
▷ Maximum class complexity50.00
Average method complexity1.83
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces18
Interfaces6
Traits7
Classes208
▷ Abstract classes83.85%
▷ Concrete classes20096.15%
▷ Final classes00.00%
Methods1,363
▷ Static methods564.11%
▷ Public methods1,06478.06%
▷ Protected methods22616.58%
▷ Private methods735.36%
Functions106
▷ Named functions1413.21%
▷ Anonymous functions9286.79%
Constants64
▷ Global constants11.56%
▷ Class constants6398.44%
▷ Public constants63100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin