77% navayan-csv-export

Code Review | Navayan CSV Export

WordPress plugin Navayan CSV Export scored77%from 54 tests.

About plugin

  • Plugin page: navayan-csv-export
  • Plugin version: 1.0.9
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: May 23, 2011
  • Latest release: Nov 18, 2012
  • Number of updates: 32
  • Update frequency: every 17.0 days
  • Top authors: amolnw2778 (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

90+ active /15,224 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼7.63ms] Passed 4 tests

An overview of server-side resources used by Navayan CSV Export
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0035.56 ▼1.67
Dashboard /wp-admin3.31 ▲0.0144.01 ▼2.79
Posts /wp-admin/edit.php3.36 ▲0.0042.03 ▼3.80
Add New Post /wp-admin/post-new.php5.89 ▲0.0080.08 ▼22.27
Media Library /wp-admin/upload.php3.23 ▲0.0038.17 ▲7.06
Navayan CSV Export /wp-admin/tools.php?page=navayan-csv-export3.1827.80

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 6 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
db_upgraded
recovery_mode_email_last_sent
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Navayan CSV Export
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲714.39 ▼0.271.58 ▼0.3238.23 ▼0.82
Dashboard /wp-admin2,202 ▲255.62 ▼0.0694.69 ▲12.3137.96 ▼4.35
Posts /wp-admin/edit.php2,104 ▲42.00 ▲0.0434.32 ▼0.2335.05 ▲1.04
Add New Post /wp-admin/post-new.php1,529 ▲122.92 ▼0.29643.00 ▼10.4255.78 ▼0.25
Media Library /wp-admin/upload.php1,404 ▲44.21 ▲0.0398.86 ▼1.6944.04 ▲0.04
Navayan CSV Export /wp-admin/tools.php?page=navayan-csv-export7321.126.7818.74

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
Please fix the following items
  • The uninstall procedure has failed, leaving 7 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • recovery_mode_email_last_sent
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Please fix the following server-side errors
    • > GET request to /wp-admin/tools.php?page=navayan-csv-export
    • > Error in wp-content/plugins/navayan-csv-export/index.php+83
    Uncaught Error: Call to undefined function mysql_query() in wp-content/plugins/navayan-csv-export/index.php:83
    Stack trace:
    #0 wp-includes/class-wp-hook.php(310): NYCSV_UI()
    #1 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #2 wp-includes/plugin.php(517): WP_Hook->do_action()
    #3 wp-admin/admin.php(259): do_action()
    #4 wp-admin/tools.php(40): require_once('/var/www/wordpr...')
    #5 {main}
    thrown

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
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/navayan-csv-export/index.php:23
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/navayan-csv-export/index.php on line 17

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 75% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Tested up to: Version not formatted correctly
  • Screenshots: Add images for these screenshots: #1 (Activated plugin's location in 'Tools' menu), #2 (Tables ready to export), #3 (Opening generated CSV file in OpenOffice)
  • Tags: Please reduce the number of tags, currently 13 tag instead of maximum 10
  • Requires at least: Version not formatted correctly
You can take inspiration from this readme.txt

navayan-csv-export/index.php 92% from 13 tests

Analyzing the main PHP file in "Navayan CSV Export" version 1.0.9
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("navayan-csv-export.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin165 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP11826136
CSS10029

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants9100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin