78% wp-csv-exporter

Code Review | WP CSV Exporter

WordPress plugin WP CSV Exporter scored78%from 54 tests.

About plugin

  • Plugin page: wp-csv-exporter
  • Plugin version: 2.0.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Dec 10, 2014
  • Latest release: Mar 29, 2023
  • Number of updates: 128
  • Update frequency: every 23.7 days
  • Top authors: kanakogi (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

10,000+ active /136,025 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼4.25ms] Passed 4 tests

Server-side resources used by WP CSV Exporter
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0439.39 ▼5.53
Dashboard /wp-admin3.34 ▲0.0450.17 ▼3.17
Posts /wp-admin/edit.php3.45 ▲0.1049.43 ▲2.67
Add New Post /wp-admin/post-new.php5.92 ▲0.0390.45 ▼3.10
Media Library /wp-admin/upload.php3.26 ▲0.0336.07 ▼5.20
CSV Export /wp-admin/tools.php?page=wp-csv-exporter3.3136.55

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for WP CSV Exporter
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,821 ▲6014.25 ▲0.021.81 ▲0.1242.39 ▼2.06
Dashboard /wp-admin2,196 ▲165.61 ▼0.0287.75 ▼0.8038.15 ▼3.89
Posts /wp-admin/edit.php2,107 ▲71.97 ▼0.0434.07 ▼5.4431.11 ▼4.95
Add New Post /wp-admin/post-new.php1,529 ▲222.95 ▼0.23645.57 ▼11.4152.56 ▼4.42
Media Library /wp-admin/upload.php1,407 ▲74.21 ▲0.0497.81 ▼8.9443.56 ▼1.26
CSV Export /wp-admin/tools.php?page=wp-csv-exporter1,8765.40114.0791.46

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

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

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 6× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_kses() in wp-content/plugins/wp-csv-exporter/admin/download.php:298
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/wp-csv-exporter/admin/index.php:2
    • > PHP Warning
      Use of undefined constant WCE_PLUGIN_DIR - assumed 'WCE_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-csv-exporter/admin/admin.php on line 3
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/wp-csv-exporter/admin/setting.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/wp-csv-exporter/wp-csv-exporter.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_types() in wp-content/plugins/wp-csv-exporter/admin/admin.php:6

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following user-side errors
    • > GET request to /wp-admin/tools.php?page=wp-csv-exporter
    • > Security (warning) in unknown
    security - Error with Permissions-Policy header: Unrecognized feature: 'ambient-light-sensor'.
    • > GET request to /wp-admin/tools.php?page=wp-csv-exporter
    • > Security (warning) in unknown
    security - Error with Permissions-Policy header: Unrecognized feature: 'bluetooth'.

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% 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
Attributes that require attention:
  • Requires at least: Invalid plugin version format
Please take inspiration from this readme.txt

wp-csv-exporter/wp-csv-exporter.php 92% from 13 tests

The entry point to "WP CSV Exporter" version 2.0.0 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Description: The description should be shorter than 140 characters (currently 194 characters long)

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
No dangerous file extensions were detected1,642 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP792126664
CSS25168538
PO File21011271
JavaScript23937169

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity5.50
▷ Minimum class complexity4.00
▷ Maximum class complexity7.00
Average method complexity1.56
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes150.00%
▷ Concrete classes150.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions125.00%
▷ Anonymous functions375.00%
Constants5
▷ Global constants5100.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
13 compressed PNG files occupy 0.02MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/images/ui-bg_glass_75_dadada_1x400.png0.11KB0.16KB0.00%
css/images/ui-icons_222222_256x240.png4.27KB4.11KB▼ 3.78%
css/images/ui-icons_888888_256x240.png4.27KB4.11KB▼ 3.78%
css/images/ui-bg_flat_75_ffffff_40x100.png0.17KB0.08KB▼ 51.12%
css/images/ui-bg_glass_55_fbf9ee_1x400.png0.12KB0.14KB0.00%