10% wtg-csv-exporter

Code Review | WTG CSV Exporter Beta for WordPress

WordPress plugin WTG CSV Exporter Beta for WordPress scored 10% from 54 tests.

About plugin

  • Plugin page: wtg-csv-exporter
  • Plugin version: 0.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8.0-4.1.1
  • WordPress version: 6.3.1
  • First release: Dec 8, 2014
  • Latest release: Mar 10, 2015
  • Number of updates: 8
  • Update frequency: every 104.0 days
  • Top authors: WebTechGlobal (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,165 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Please fix the following installer errors
  • The plugin did not install without errors
    • > Warning in wp-content/plugins/wtg-csv-exporter/classes/class-wtgcsvexporter.php+413
    count(): Parameter must be an array or an object that implements Countable

Server metrics [RAM: ▼1.95MB] [CPU: ▼53.27ms] Passed 4 tests

An overview of server-side resources used by WTG CSV Exporter Beta for WordPress
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.04 ▼1.424.21 ▼33.48
Dashboard /wp-admin2.06 ▼1.255.42 ▼44.07
Posts /wp-admin/edit.php2.06 ▼1.306.03 ▼41.78
Add New Post /wp-admin/post-new.php2.06 ▼3.835.43 ▼93.73
Media Library /wp-admin/upload.php2.06 ▼1.176.01 ▼27.89
Create Profiles (alpha) /wp-admin/admin.php?page=wtgcsvexporter_createbasicprofiles2.065.24
Basic Default Profiles /wp-admin/admin.php?page=wtgcsvexporter_allposts2.066.06
Plugin Dashboard /wp-admin/admin.php?page=wtgcsvexporter2.065.70

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 82 new files
Database: no new tables, 8 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
wtgcsvexporter_formvalidation
db_upgraded
wtgcsvexporter_settings
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for WTG CSV Exporter Beta for WordPress
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲9613.67 ▼0.701.58 ▼0.1641.94 ▼2.55
Dashboard /wp-admin2,237 ▲465.88 ▲0.98102.07 ▼2.0342.10 ▲0.21
Posts /wp-admin/edit.php2,120 ▲312.01 ▲0.0138.06 ▲3.6135.55 ▲0.81
Add New Post /wp-admin/post-new.php1,567 ▲3323.09 ▼0.19592.36 ▼91.9958.15 ▲3.82
Media Library /wp-admin/upload.php1,422 ▲404.22 ▼0.13101.24 ▲1.5745.08 ▲4.33
Create Profiles (alpha) /wp-admin/admin.php?page=wtgcsvexporter_createbasicprofiles1,0822.1237.0826.52
Basic Default Profiles /wp-admin/admin.php?page=wtgcsvexporter_allposts1,3952.2541.7830.47
Plugin Dashboard /wp-admin/admin.php?page=wtgcsvexporter3,68111.32203.1590.21

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
  • Uninstall procedure validation failed for this plugin
    • > Warning in wp-content/plugins/wtg-csv-exporter/classes/class-wtgcsvexporter.php+413
    count(): Parameter must be an array or an object that implements Countable
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • wtgcsvexporter_formvalidation
    • wtgcsvexporter_settings
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
  • 180 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wtgcsvexporter
    • > Warning in wp-content/plugins/wtg-csv-exporter/classes/class-wtgcsvexporter.php+413
    count(): Parameter must be an array or an object that implements Countable
    • > GET request to /wp-admin/admin.php?page=wtgcsvexporter_createbasicprofiles
    • > Notice in wp-content/plugins/wtg-csv-exporter/views/createbasicprofiles.php+59
    Undefined index: csvexportprofiles
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wtgcsvexporter_createbasicprofiles
    • > Notice in wp-content/plugins/wtg-csv-exporter/views/createbasicprofiles.php+59
    Trying to access array offset on value of type null
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wtgcsvexporter
    • > User deprecated in wp-includes/functions.php+5453
    Function get_currentuserinfo is deprecated since version 4.5.0! Use wp_get_current_user() instead.
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wtgcsvexporter
    • > Notice in wp-content/plugins/wtg-csv-exporter/classes/class-ui.php+146
    Undefined index: tabs
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wtgcsvexporter
    • > Warning in wp-content/plugins/wtg-csv-exporter/classes/class-ui.php+146
    Invalid argument supplied for foreach()
  • 20 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wtgcsvexporter
    • > Notice in wp-content/plugins/wtg-csv-exporter/views/main.php+732
    Undefined index: name

SRP 0% 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
Almost there! Just fix the following items
  • 32× PHP files perform the task of outputting text when accessed with GET requests (only 10 are shown):
    • > /wp-content/plugins/wtg-csv-exporter/arrays/settings_array.php
    • > /wp-content/plugins/wtg-csv-exporter/classes/class-wpdb.php
    • > /wp-content/plugins/wtg-csv-exporter/views/posts.php
    • > /wp-content/plugins/wtg-csv-exporter/classes/class-phplibrary.php
    • > /wp-content/plugins/wtg-csv-exporter/classes/class-files.php
    • > /wp-content/plugins/wtg-csv-exporter/arrays/schedule_array.php
    • > /wp-content/plugins/wtg-csv-exporter/classes/class-flags.php
    • > /wp-content/plugins/wtg-csv-exporter/classes/class-view.php
    • > /wp-content/plugins/wtg-csv-exporter/views/createbasicprofiles.php
    • > /wp-content/plugins/wtg-csv-exporter/classes/class-updates.php
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WTGCSVEXPORTER_UI' not found in wp-content/plugins/wtg-csv-exporter/classes/class-forms.php:19

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
These are user-side errors you should fix
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wtgcsvexporter
    • > Network (severe)
    wp-content/plugins/wtgcsvexporter/css/notifications.css?ver=1.0.0 - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wtgcsvexporter
    • > Network (severe)
    wp-content/plugins/wtgcsvexporter/css/admin.css?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=wtgcsvexporter
    • > Security (warning) in unknown
    security - Error with Permissions-Policy header: Unrecognized feature: 'ambient-light-sensor'.
    • > GET request to /wp-admin/admin.php?page=wtgcsvexporter
    • > Security (warning) in unknown
    security - Error with Permissions-Policy header: Unrecognized feature: 'bluetooth'.

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === wtg-csv-exporter === )
  • Screenshots: Please add images for these screenshots: #1 (Screenshot one.), #2 (Screenshot two.), #3 (Screenshot three.)
The official readme.txt might help

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

The main PHP script in "WTG CSV Exporter Beta for WordPress" version 0.0.4 is automatically included on every request by WordPress
The following require your attention:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

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
There were no executable files found in this plugin10,796 lines of code in 42 files:
LanguageFilesBlank linesComment linesLines of code
PHP372,4707,8658,810
PO File16231,3881,339
CSS29342615
JavaScript2113932

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity38.82
▷ Minimum class complexity1.00
▷ Maximum class complexity256.00
Average method complexity3.68
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes38
▷ Abstract classes12.63%
▷ Concrete classes3797.37%
▷ Final classes00.00%
Methods537
▷ Static methods50.93%
▷ Public methods52297.21%
▷ Protected methods142.61%
▷ Private methods10.19%
Functions22
▷ Named functions22100.00%
▷ Anonymous functions00.00%
Constants22
▷ Global constants2090.91%
▷ Class constants29.09%
▷ Public constants2100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
26 PNG files occupy 2.08MB with 1.94MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/video-icon.png29.27KB0.64KB▼ 97.82%
images/validation_large.png61.75KB5.57KB▼ 90.98%
images/trash-icon.png29.53KB1.05KB▼ 96.43%
images/restricted_large.png59.16KB5.39KB▼ 90.89%
images/add_large.png60.96KB5.47KB▼ 91.02%