84% wp-e-commerce-exporter

Code Review | WP e-Commerce - Store Exporter

WordPress plugin WP e-Commerce - Store Exporter scored84%from 54 tests.

About plugin

  • Plugin page: wp-e-commerce-exp...
  • Plugin version: 1.7.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.9.2-5.0
  • WordPress version: 6.3.1
  • First release: Aug 2, 2012
  • Latest release: Dec 10, 2018
  • Number of updates: 46
  • Update frequency: every 50.7 days
  • Top authors: visser (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

100+ active /24,350 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

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

This is a short check of server-side resources used by WP e-Commerce - Store Exporter
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0040.05 ▼0.41
Dashboard /wp-admin3.68 ▲0.3747.48 ▼4.36
Posts /wp-admin/edit.php3.37 ▲0.0146.13 ▼0.83
Add New Post /wp-admin/post-new.php5.90 ▲0.0180.87 ▼4.82
Media Library /wp-admin/upload.php3.24 ▲0.0139.04 ▲2.57

Server storage [IO: ▲0.33MB] [DB: ▲0.05MB] Passed 3 tests

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 52 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP e-Commerce - Store Exporter
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,915 ▲16913.18 ▼1.581.69 ▼0.0438.84 ▼7.34
Dashboard /wp-admin2,321 ▲1304.84 ▼0.04106.88 ▲2.5540.45 ▼1.00
Posts /wp-admin/edit.php2,089 ▼02.03 ▼0.0335.27 ▼2.0834.45 ▲0.58
Add New Post /wp-admin/post-new.php1,542 ▲1418.35 ▼0.01639.70 ▲11.7260.19 ▲3.60
Media Library /wp-admin/upload.php1,393 ▲54.20 ▼0.0399.88 ▼3.5540.58 ▼8.21

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for 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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 38× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Warning
      include_once(WPSC_CE_PATHincludes/export-csv.php): failed to open stream: No such file or directory in wp-content/plugins/wp-e-commerce-exporter/includes/functions.php on line 11
    • > PHP Warning
      Use of undefined constant WPSC_CE_PATH - assumed 'WPSC_CE_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-e-commerce-exporter/includes/functions.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-e-commerce-exporter/templates/admin/tabs-settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-e-commerce-exporter/templates/admin/tabs-export.php:2
    • > PHP Warning
      include_once(): Failed opening 'WPSC_CE_PATHincludes/tag.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/wp-e-commerce-exporter/includes/functions.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/wp-e-commerce-exporter/includes/functions.php:13
    • > PHP Warning
      include_once(WPSC_CE_PATHincludes/tag.php): failed to open stream: No such file or directory in wp-content/plugins/wp-e-commerce-exporter/includes/functions.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-e-commerce-exporter/includes/common-dashboard_widgets.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-e-commerce-exporter/templates/admin/media-csv_file.php:4
    • > PHP Warning
      Use of undefined constant WPSC_CE_PATH - assumed 'WPSC_CE_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-e-commerce-exporter/includes/functions.php on line 7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
Please take inspiration from this readme.txt

wp-e-commerce-exporter/exporter.php 92% from 13 tests

"WP e-Commerce - Store Exporter" version 1.7.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wp-e-commerce-exporter.php" instead of "exporter.php")

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
Success! There were no dangerous files found in this plugin6,109 lines of code in 32 files:
LanguageFilesBlank linesComment linesLines of code
PHP247492724,148
JavaScript3112921,128
CSS44565767
PO File1273266

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.36
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%
Functions111
▷ Named functions111100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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
14 compressed PNG files occupy 0.02MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
templates/admin/images/ui-bg_glass_55_fbf9ee_1x400.png0.12KB0.14KB0.00%
templates/admin/images/ui-bg_glass_75_e6e6e6_1x400.png0.11KB0.14KB0.00%
templates/admin/images/ui-bg_glass_65_ffffff_1x400.png0.10KB0.10KB▼ 5.71%
templates/admin/chosen-sprite.png0.55KB0.70KB0.00%
templates/admin/images/ui-bg_flat_0_aaaaaa_40x100.png0.18KB0.08KB▼ 51.67%