84% export-2-excel

Code Review | Export to Excel

WordPress plugin Export to Excel scored84%from 54 tests.

About plugin

  • Plugin page: export-2-excel
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.9
  • WordPress version: 6.3.1
  • First release: Jun 20, 2012
  • Latest release: Jun 11, 2014
  • Number of updates: 5
  • Update frequency: every 144.6 days
  • Top authors: kapilchugh (100%)

Code review

54 tests

User reviews

21 reviews

Install metrics

400+ active /27,755 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

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

Analyzing server-side resources used by Export to Excel
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.22 ▼1.89
Dashboard /wp-admin3.32 ▼0.0248.68 ▼13.68
Posts /wp-admin/edit.php3.38 ▲0.0246.29 ▼1.33
Add New Post /wp-admin/post-new.php5.91 ▲0.0283.21 ▼22.30
Media Library /wp-admin/upload.php3.25 ▲0.0236.34 ▲2.99
Export to Excel /wp-admin/tools.php?page=export-2-excel3.2432.08

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Export to Excel
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.07 ▼0.091.82 ▼0.0242.78 ▼0.78
Dashboard /wp-admin2,202 ▲215.63 ▼0.1189.07 ▼18.1539.24 ▼6.33
Posts /wp-admin/edit.php2,104 ▲42.03 ▲0.0934.83 ▼3.6436.62 ▼0.89
Add New Post /wp-admin/post-new.php1,531 ▲322.68 ▼0.57674.22 ▲64.1765.75 ▲14.58
Media Library /wp-admin/upload.php1,398 ▲14.17 ▼0.0499.93 ▼11.0045.06 ▲0.89
Export to Excel /wp-admin/tools.php?page=export-2-excel9941.6825.6446.92

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
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 6× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_types() in wp-content/plugins/export-2-excel/includes/select_criteria.php:12
    • > 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/export-2-excel/includes/defines.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function query_posts() in wp-content/plugins/export-2-excel/includes/loop.php:3
    • > 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/export-2-excel/includes/defines.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/export-2-excel/export-2-excel.php:23
    • > PHP Notice
      Undefined variable: post_type in wp-content/plugins/export-2-excel/includes/loop.php on line 2

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (Select post and fields to be displayed in Excel.), #2 (Select page and fields to be displayed in Excel.), #3 (Select comments author and fields to be displayed in Excel.)
You can take inspiration from this readme.txt

export-2-excel/export-2-excel.php Passed 13 tests

The entry point to "Export to Excel" version 1.0 is a PHP file that has certain tags in its header comment area
99 characters long description:
A plugin which allows you to download your posts, pages, custom post types to .xls or .xlsx format.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin436 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP61823346
JavaScript11355
CSS12035

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.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
3 PNG files occupy 0.06MB with 0.04MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png20.97KB9.20KB▼ 56.13%
screenshot-3.png20.53KB8.94KB▼ 56.45%
screenshot-1.png23.13KB9.79KB▼ 57.66%