94% csv-download

Code Review | CSV Download

WordPress plugin CSV Download scored 94% from 54 tests.

About plugin

  • Plugin page: csv-download
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress version: 5.8.1
  • First release: Aug 2, 2016
  • Latest release: Aug 2, 2016
  • Number of updates: 12
  • Update frequency: N/A
  • Top authors: desie314 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 986 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼143.63ms] Passed 4 tests

A check of server-side resources used by CSV Download
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.1337.48 ▲13.29
Dashboard /wp-admin3.08 ▲0.0248.87 ▼0.72
Posts /wp-admin/edit.php3.13 ▲0.0257.39 ▲0.45
Add New Post /wp-admin/post-new.php5.43 ▲0.0098.35 ▼571.00
Media Library /wp-admin/upload.php3.02 ▲0.0235.16 ▼3.23

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for CSV Download
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,689 ▲9315.91 ▲0.179.29 ▼1.7546.65 ▼9.27
Dashboard /wp-admin2,970 ▲426.10 ▼0.06167.55 ▼5.64123.35 ▲3.49
Posts /wp-admin/edit.php2,739 ▼02.72 ▲0.0180.46 ▲2.9992.47 ▼0.80
Add New Post /wp-admin/post-new.php1,615 ▼6821.53 ▲2.72335.22 ▼89.20111.45 ▼12.76
Media Library /wp-admin/upload.php1,807 ▼35.04 ▲0.01161.01 ▼31.92120.80 ▼10.44

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not 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
Please fix the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/csv-download/csvdownload.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Screenshot #1 (Admin section example metabox.) image missing
You can take inspiration from this readme.txt

csv-download/csvdownload.php 92% from 13 tests

"CSV Download" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("csv-download.php" instead of "csvdownload.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin79 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1268479

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.54
Average class complexity22.00
▷ Minimum class complexity22.00
▷ Maximum class complexity22.00
Average method complexity5.20
▷ Minimum method complexity2.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods120.00%
▷ Public methods480.00%
▷ Protected methods00.00%
▷ Private methods120.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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.06MB with 0.04MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png57.22KB16.57KB▼ 71.04%