83% export-customers-data

Code Review | Export Customers Data

WordPress plugin Export Customers Data scored83%from 54 tests.

About plugin

  • Plugin page: export-customers-...
  • Plugin version: 1.2.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.2
  • WordPress version: 6.3.1
  • First release: Dec 14, 2019
  • Latest release: May 1, 2023
  • Number of updates: 10
  • Update frequency: every 123.4 days
  • Top authors: fahadmahmood (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /815 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
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼0.82ms] Passed 4 tests

A check of server-side resources used by Export Customers Data
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1542.56 ▼1.16
Dashboard /wp-admin3.32 ▲0.0248.72 ▲0.17
Posts /wp-admin/edit.php3.37 ▲0.0148.35 ▲5.22
Add New Post /wp-admin/post-new.php5.90 ▲0.0193.26 ▼3.63
Media Library /wp-admin/upload.php3.24 ▲0.0134.96 ▲1.36

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Export Customers Data
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.27 ▼0.081.68 ▼0.2742.29 ▼6.75
Dashboard /wp-admin2,198 ▲245.63 ▲0.0691.87 ▼7.9442.20 ▲3.93
Posts /wp-admin/edit.php2,100 ▼32.02 ▲0.0741.19 ▼0.7035.30 ▼0.27
Add New Post /wp-admin/post-new.php1,531 ▲323.03 ▼0.11655.55 ▲38.2561.51 ▲6.72
Media Library /wp-admin/upload.php1,400 ▲94.26 ▲0.0898.91 ▼5.0044.65 ▼1.99

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however 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
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/export-customers-data/inc/wcde_settings.php:1

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: wordpress csv export, csv, import, meta data, user export

export-customers-data/index.php 77% from 13 tests

This is the main PHP file of "Export Customers Data" version 1.2.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Domain Path: The domain path is invalid: folder "/languages/" does not exist
  • Main file name: Name the main plugin file the same as the plugin slug ("export-customers-data.php" instead of "index.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected13,579 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
CSS21,20389,031
JavaScript28583263,363
PHP4296981,185

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity103.00
▷ Minimum class complexity12.00
▷ Maximum class complexity194.00
Average method complexity5.16
▷ Minimum method complexity1.00
▷ Maximum method complexity36.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods49
▷ Static methods1122.45%
▷ Public methods3163.27%
▷ Protected methods1428.57%
▷ Private methods48.16%
Functions12
▷ Named functions1191.67%
▷ Anonymous functions18.33%
Constants3
▷ Global constants133.33%
▷ Class constants266.67%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/woo.png5.93KB3.17KB▼ 46.59%