74% select-table-and-column-and-output-in-csv

Code Review | Select table and column and output in CSV

WordPress plugin Select table and column and output in CSV scored74%from 54 tests.

About plugin

  • Plugin page: select-table-and-...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.8-4.9.8
  • WordPress version: 6.3.1
  • First release: Jul 14, 2019
  • Latest release: Jul 15, 2019
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: powcyan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /541 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.92MB] [CPU: ▼35.59ms] Passed 4 tests

Analyzing server-side resources used by Select table and column and output in CSV
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0340.49 ▲0.77
Dashboard /wp-admin3.02 ▼0.2825.93 ▼30.10
Posts /wp-admin/edit.php3.03 ▼0.3327.41 ▼22.94
Add New Post /wp-admin/post-new.php3.02 ▼2.8625.26 ▼80.28
Media Library /wp-admin/upload.php3.02 ▼0.2124.51 ▼9.03

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Select table and column and output in CSV
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲4414.34 ▼0.061.63 ▼0.0642.41 ▲0.70
Dashboard /wp-admin2,214 ▲395.62 ▼0.0284.30 ▼20.1538.37 ▼7.55
Posts /wp-admin/edit.php2,116 ▲132.02 ▲0.0540.05 ▲3.5936.34 ▲3.14
Add New Post /wp-admin/post-new.php1,544 ▲1623.27 ▲0.07647.53 ▲47.4751.56 ▼11.26
Media Library /wp-admin/upload.php1,410 ▲104.27 ▼0.04103.62 ▲1.6743.72 ▼4.90

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/select-table-and-column-and-output-in-csv/showDBTC.php+22
    Undefined index: HTTP_ACCEPT_LANGUAGE
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

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
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/select-table-and-column-and-output-in-csv/showDBTC.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
3 plugin tags: database, analysis, csv

select-table-and-column-and-output-in-csv/showDBTC.php 85% from 13 tests

The primary PHP file in "Select table and column and output in CSV" version 1.0 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Description: Keep the plugin description shorter than 140 characters (currently 248 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("select-table-and-column-and-output-in-csv.php" instead of "showDBTC.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin222 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1769222

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity40.00
▷ Minimum class complexity40.00
▷ Maximum class complexity40.00
Average method complexity10.75
▷ Minimum method complexity1.00
▷ Maximum method complexity36.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods375.00%
▷ Protected methods00.00%
▷ Private methods125.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected