10% csv-sumotto

Code Review | CSV Sumotto

WordPress plugin CSV Sumotto scored10%from 54 tests.

About plugin

  • Plugin page: csv-sumotto
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.6-3.5.1
  • WordPress version: 6.3.1
  • First release: Feb 21, 2013
  • Latest release: Feb 23, 2013
  • Number of updates: 3
  • Update frequency: every 0.7 days
  • Top authors: SumoTTo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /967 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The following installer errors require your attention
  • Install procedure validation failed for this plugin
    • > User notice in wp-includes/functions.php+5905
    Function add_shortcode was called incorrectly. Invalid shortcode name: Empty name given. Please see Debugging in WordPress for more information. (This message was added in version 4.4.0.)

Server metrics [RAM: ▼0.95MB] [CPU: ▼37.28ms] Passed 4 tests

An overview of server-side resources used by CSV Sumotto
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0039.43 ▼2.21
Dashboard /wp-admin2.99 ▼0.3125.52 ▼30.24
Posts /wp-admin/edit.php3.00 ▼0.3625.99 ▼24.97
Add New Post /wp-admin/post-new.php3.00 ▼2.8925.56 ▼81.93
Media Library /wp-admin/upload.php3.00 ▼0.2325.00 ▼11.98
CSV SumoTTo /wp-admin/options-general.php?page=csv_sumotto_settings3.0025.78
Add New /wp-admin/admin.php?page=csv_sumotto_add_table_menu3.0025.98
All Tables /wp-admin/admin.php?page=csv_sumotto3.0023.36

Server storage [IO: ▲0.12MB] [DB: ▲0.07MB] Passed 3 tests

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 21 new files
Database: 1 new table, 6 new options
New tables
wp_csv_sumotto
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for CSV Sumotto
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,821 ▲6014.25 ▼0.131.76 ▼0.2641.63 ▼2.26
Dashboard /wp-admin2,227 ▲475.59 ▼0.1191.56 ▲2.5761.94 ▲16.23
Posts /wp-admin/edit.php2,135 ▲351.98 ▼0.0840.20 ▼2.3439.51 ▲3.66
Add New Post /wp-admin/post-new.php1,566 ▲2023.19 ▼0.00761.23 ▲96.8759.30 ▲1.14
Media Library /wp-admin/upload.php1,426 ▲264.24 ▼0.01104.91 ▲4.4875.26 ▲30.89
CSV SumoTTo /wp-admin/options-general.php?page=csv_sumotto_settings9642.0227.0936.48
Add New /wp-admin/admin.php?page=csv_sumotto_add_table_menu9162.0225.0729.21
All Tables /wp-admin/admin.php?page=csv_sumotto8602.0324.9529.17

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin did not uninstall without warnings or errors
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These errors were triggered by the plugin
  • 26 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=csv_sumotto
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=csv_sumotto
    • > Warning in wp-content/plugins/csv-sumotto/csv_sumotto_tables.php+3
    Use of undefined constant csv_sumotto - assumed 'csv_sumotto' (this will throw an Error in a future version of PHP)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=csv_sumotto_add_table_menu
    • > Notice in wp-content/plugins/csv-sumotto/csv_sumotto_add_table.php+49
    Only variables should be passed by reference
    • > GET request to /wp-admin/admin.php?page=csv_sumotto
    • > Notice in wp-content/plugins/csv-sumotto/csv_sumotto_all_tables.php+4
    Undefined variable: messege

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 9× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/csv-sumotto/csv_sumotto_function.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/csv-sumotto/csv_sumotto_all_tables.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_upload_dir() in wp-content/plugins/csv-sumotto/csv_sumotto_settings.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/csv-sumotto/csv_sumotto_redactor.php:8
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/csv-sumotto/csv_sumotto_tables.php:18
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/csv-sumotto/csv_sumotto_tables.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_upload_dir() in wp-content/plugins/csv-sumotto/csv_sumotto_add_table.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/csv-sumotto/csv_sumotto_edit_table.php:3
    • > PHP Warning
      Use of undefined constant csv_sumotto - assumed 'csv_sumotto' (this will throw an Error in a future version of PHP) in wp-content/plugins/csv-sumotto/csv_sumotto_tables.php on line 3

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following browser errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=csv_sumotto
    • > Network (severe)
    wp-content/plugins/csv-sumotto/images/icon.png%20height=18px%20width=18px - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/options-general.php?page=csv_sumotto_settings
    • > Network (severe)
    https://www.paypalobjects.com/ru_RU/i/scr/pixel.gif - Failed to load resource: the server responded with a status of 404 ()

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
3 plugin tags: excel, csv, table

csv-sumotto/csv_sumotto_function.php 92% from 13 tests

The main PHP script in "CSV Sumotto" version 1.0 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("csv-sumotto.php" instead of "csv_sumotto_function.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
Success! There were no dangerous files found in this plugin913 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP9420673
PO File17190163
CSS10076
JavaScript1001

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.20
Average class complexity17.00
▷ Minimum class complexity17.00
▷ Maximum class complexity17.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
6 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/wpicons2.png11.17KB5.00KB▼ 55.19%
images/ico2n.png3.55KB1.59KB▼ 55.25%
images/88x31_wm_blue_on_transparent_ru.png1.41KB0.82KB▼ 42.15%
images/icon.png1.19KB0.77KB▼ 35.84%
images/activcell.png0.11KB0.11KB0.00%