61% search-excel-csv

Code Review | Search Excel CSV

WordPress plugin Search Excel CSV scored61%from 54 tests.

About plugin

  • Plugin page: search-excel-csv
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jun 12, 2019
  • Latest release: Jun 19, 2019
  • Number of updates: 7
  • Update frequency: every 1.0 days
  • Top authors: itmonitor (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /667 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼1.24MB] [CPU: ▼47.65ms] Passed 4 tests

Server-side resources used by Search Excel CSV
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.74 ▼0.7313.35 ▼30.53
Dashboard /wp-admin2.77 ▼0.5316.36 ▼34.62
Posts /wp-admin/edit.php2.77 ▼0.5818.37 ▼36.56
Add New Post /wp-admin/post-new.php2.77 ▼3.1116.94 ▼88.87
Media Library /wp-admin/upload.php2.77 ▼0.4518.60 ▼23.31
Search CSV/Excel /wp-admin/options-general.php?page=wcs_settings2.7716.82

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 277 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

Search Excel CSV: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,372 ▲62616.91 ▲2.4919.01 ▲17.2445.86 ▲2.90
Dashboard /wp-admin2,358 ▲1706.50 ▲0.60123.39 ▲9.4147.42 ▲4.48
Posts /wp-admin/edit.php2,264 ▲1753.45 ▲1.4552.45 ▲12.2637.88 ▼0.15
Add New Post /wp-admin/post-new.php1,671 ▲15221.84 ▼1.52567.44 ▼71.1631.72 ▼18.03
Media Library /wp-admin/upload.php1,404 ▲134.14 ▼0.0683.98 ▼16.4745.10 ▼1.01
Search CSV/Excel /wp-admin/options-general.php?page=wcs_settings1,1273.0340.32102.89

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
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/search-excel-csv/modules/settings.php+288
    Undefined variable: locale_taro
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget

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
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wcs_settings
    • > Notice in wp-content/plugins/search-excel-csv/modules/settings.php+289
    Undefined variable: locale_taro
    • > GET request to /wp-admin/options-general.php?page=wcs_settings
    • > Notice in wp-content/plugins/search-excel-csv/modules/settings.php+13
    Undefined index: save_settings_field
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wcs_settings
    • > Notice in wp-content/plugins/search-excel-csv/modules/settings.php+109
    Undefined index: class
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wcs_settings
    • > Notice in wp-content/plugins/search-excel-csv/modules/settings.php+109
    Undefined index: placeholder
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wcs_settings
    • > Notice in wp-content/plugins/search-excel-csv/modules/settings.php+109
    Trying to access array offset on value of type bool
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wcs_settings
    • > Notice in wp-content/plugins/search-excel-csv/modules/settings.php+110
    Undefined index: sub_text
    • > GET request to /wp-admin/options-general.php?page=wcs_settings
    • > Notice in wp-content/plugins/search-excel-csv/modules/settings.php+110
    Undefined variable: out

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 items
  • 105× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Warning
      Use of undefined constant PHPEXCEL_ROOT - assumed 'PHPEXCEL_ROOT' (this will throw an Error in a future version of PHP) in wp-content/plugins/search-excel-csv/modules/inc/phpExcel/PHPExcel/Shared/trend/trendClass.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'PHPExcel_Chart_Properties' not found in wp-content/plugins/search-excel-csv/modules/inc/phpExcel/PHPExcel/Chart/GridLines.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'PHPExcel_Writer_Excel2007_WriterPart' not found in wp-content/plugins/search-excel-csv/modules/inc/phpExcel/PHPExcel/Writer/Excel2007/ContentTypes.php:28
    • > PHP Fatal error
      Uncaught Error: Class 'PHPExcel_Worksheet_BaseDrawing' not found in wp-content/plugins/search-excel-csv/modules/inc/phpExcel/PHPExcel/Worksheet/Drawing.php:28
    • > PHP Fatal error
      Uncaught Error: Class 'PHPExcel_Writer_OpenDocument_WriterPart' not found in wp-content/plugins/search-excel-csv/modules/inc/phpExcel/PHPExcel/Writer/OpenDocument/Meta.php:28
    • > PHP Fatal error
      require_once(): Failed opening required 'PHPEXCEL_ROOTPHPExcel/Shared/trend/bestFitClass.php' (include_path='.:/usr/share/php') in wp-content/plugins/search-excel-csv/modules/inc/phpExcel/PHPExcel/Shared/trend/polynomialBestFitClass.php on line 3
    • > PHP Fatal error
      require_once(): Failed opening required 'PHPEXCEL_ROOTPHPExcel/Shared/trend/bestFitClass.php' (include_path='.:/usr/share/php') in wp-content/plugins/search-excel-csv/modules/inc/phpExcel/PHPExcel/Shared/trend/exponentialBestFitClass.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'PHPExcel_Writer_Excel2007_WriterPart' not found in wp-content/plugins/search-excel-csv/modules/inc/phpExcel/PHPExcel/Writer/Excel2007/Drawing.php:28
    • > PHP Fatal error
      Uncaught Error: Class 'PHPExcel_Writer_Excel2007_WriterPart' not found in wp-content/plugins/search-excel-csv/modules/inc/phpExcel/PHPExcel/Writer/Excel2007/Theme.php:36
    • > PHP Fatal error
      Uncaught Error: Class 'PHPExcel_Style_Supervisor' not found in wp-content/plugins/search-excel-csv/modules/inc/phpExcel/PHPExcel/Style/Alignment.php:27

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There are user-side issues you should fix
    • > GET request to /wp-admin/options-general.php?page=wcs_settings
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1 1:28609 "jQuery.Deferred exception: jQuery(...).live is not a function" "TypeError: jQuery(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/search-excel-csv/modules/js/admin.js?ver=6.3.1:9:32)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/options-general.php?page=wcs_settings
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1 1:28721 Uncaught TypeError: jQuery(...).live is not a function

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% 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
Please fix the following attributes:
  • Requires php: The plugin version is formatted incorrectly
  • Requires at least: The plugin version is formatted incorrectly
  • Tested up to: The plugin version is formatted incorrectly
The official readme.txt is a good inspiration

search-excel-csv/search-excel-csv.php 92% from 13 tests

The main file in "Search Excel CSV" v. 1.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Description: Please keep the plugin description shorter than 140 characters (currently 289 characters long)

Code Analysis 95% from 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
No dangerous file extensions were detected74,196 lines of code in 229 files:
LanguageFilesBlank linesComment linesLines of code
PHP21910,89635,78258,320
CSS61,08713614,602
JavaScript45383371,274

PHP code 0% from 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Please fix the following
  • Class cyclomatic complexity should be reduced to less than 1000 (currently 1,019)
  • Method cyclomatic complexity should be reduced to less than 100 (currently 387)
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity49.11
▷ Minimum class complexity1.00
▷ Maximum class complexity1,019.00
Average method complexity4.64
▷ Minimum method complexity1.00
▷ Maximum method complexity387.00
Code structure
Namespaces0
Interfaces7
Traits0
Classes209
▷ Abstract classes104.78%
▷ Concrete classes19995.22%
▷ Final classes00.00%
Methods2,873
▷ Static methods62821.86%
▷ Public methods2,28179.39%
▷ Protected methods802.78%
▷ Private methods51217.82%
Functions16
▷ Named functions1593.75%
▷ Anonymous functions16.25%
Constants812
▷ Global constants11814.53%
▷ Class constants69485.47%
▷ Public constants694100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
5 PNG files occupy 0.11MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
modules/inc/assets/css/glyphicons-halflings-white.png8.57KB9.20KB0.00%
modules/inc/assets/css/glyphicons-halflings.png12.50KB10.35KB▼ 17.19%
modules/inc/assets/img/glyphicons-halflings.png12.50KB10.35KB▼ 17.19%
modules/inc/assets/img/glyphicons-halflings-white.png8.57KB9.20KB0.00%
modules/images/paypal-donate-button-high-quality-png.png68.86KB20.25KB▼ 70.58%