83% pw-woocommerce-lets-export

Code Review | PW WooCommerce Let's Export!

WordPress plugin PW WooCommerce Let's Export! scored83%from 54 tests.

About plugin

  • Plugin page: pw-woocommerce-le...
  • Plugin version: 1.28
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.4
  • WordPress version: 6.3.1
  • First release: Oct 9, 2017
  • Latest release: Oct 25, 2023
  • Number of updates: 34
  • Update frequency: every 64.9 days
  • Top authors: pimwick (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,362 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼2.95ms] Passed 4 tests

Analyzing server-side resources used by PW WooCommerce Let's Export!
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0838.26 ▼2.63
Dashboard /wp-admin3.39 ▲0.0464.49 ▲5.46
Posts /wp-admin/edit.php3.50 ▲0.1543.80 ▼3.50
Add New Post /wp-admin/post-new.php5.97 ▲0.0881.50 ▼7.50
Media Library /wp-admin/upload.php3.31 ▲0.0835.11 ▲1.82

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 155 new files
Database: 1 new table, 6 new options
New tables
wp_pw_lets_export
New WordPress options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for PW WooCommerce Let's Export!
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲1814.17 ▼0.391.76 ▲0.0144.44 ▲3.98
Dashboard /wp-admin2,192 ▲125.59 ▼0.0897.55 ▲11.7341.27 ▲0.15
Posts /wp-admin/edit.php2,100 ▼02.01 ▲0.0334.73 ▲0.1836.32 ▲0.52
Add New Post /wp-admin/post-new.php1,526 ▼022.98 ▼0.14666.20 ▼0.9566.12 ▲8.69
Media Library /wp-admin/upload.php1,400 ▼34.17 ▼0.0595.20 ▼4.1840.44 ▼2.68

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 55× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Box\\Spout\\Writer\\Exception\\WriterException' not found in wp-content/plugins/pw-woocommerce-lets-export/includes/output/spout-2.7.3/src/Spout/Writer/Exception/Border/InvalidStyleException.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'Box\\Spout\\Reader\\SheetInterface' not found in wp-content/plugins/pw-woocommerce-lets-export/includes/output/spout-2.7.3/src/Spout/Reader/XLSX/Sheet.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'Box\\Spout\\Reader\\IteratorInterface' not found in wp-content/plugins/pw-woocommerce-lets-export/includes/output/spout-2.7.3/src/Spout/Reader/CSV/RowIterator.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Box\\Spout\\Reader\\Exception\\ReaderException' not found in wp-content/plugins/pw-woocommerce-lets-export/includes/output/spout-2.7.3/src/Spout/Reader/Exception/SharedStringNotFoundException.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Box\\Spout\\Writer\\Exception\\WriterException' not found in wp-content/plugins/pw-woocommerce-lets-export/includes/output/spout-2.7.3/src/Spout/Writer/Exception/WriterAlreadyOpenedException.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'Box\\Spout\\Reader\\ReaderInterface' not found in wp-content/plugins/pw-woocommerce-lets-export/includes/output/spout-2.7.3/src/Spout/Reader/AbstractReader.php:14
    • > PHP Fatal error
      Uncaught Error: Interface 'Box\\Spout\\Reader\\IteratorInterface' not found in wp-content/plugins/pw-woocommerce-lets-export/includes/output/spout-2.7.3/src/Spout/Reader/ODS/SheetIterator.php:17
    • > PHP Fatal error
      Uncaught Error: Interface 'Box\\Spout\\Reader\\XLSX\\Helper\\SharedStringsCaching\\CachingStrategyInterface' not found in wp-content/plugins/pw-woocommerce-lets-export/includes/output/spout-2.7.3/src/Spout/Reader/XLSX/Helper/SharedStringsCaching/FileBasedStrategy.php:18
    • > PHP Fatal error
      Uncaught Error: Interface 'Box\\Spout\\Writer\\Common\\Internal\\WorksheetInterface' not found in wp-content/plugins/pw-woocommerce-lets-export/includes/output/spout-2.7.3/src/Spout/Writer/ODS/Internal/Worksheet.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Box\\Spout\\Writer\\Common\\Internal\\AbstractWorkbook' not found in wp-content/plugins/pw-woocommerce-lets-export/includes/output/spout-2.7.3/src/Spout/Writer/ODS/Internal/Workbook.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 90% 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
These attributes need your attention:
  • Tags: You are using too many tags: 12 tag instead of maximum 10
The official readme.txt might help

pw-woocommerce-lets-export/pw-lets-export.php 85% from 13 tests

The main PHP file in "PW WooCommerce Let's Export!" ver. 1.28 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.5" instead of "4.0")
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("pw-woocommerce-lets-export.php" instead of "pw-lets-export.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected10,880 lines of code in 130 files:
LanguageFilesBlank linesComment linesLines of code
PHP1222,1764,9237,631
SVG1002,671
CSS47816392
JavaScript1233111
Markdown124039
JSON11036

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity6.31
▷ Minimum class complexity1.00
▷ Maximum class complexity53.00
Average method complexity1.92
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces29
Interfaces8
Traits2
Classes102
▷ Abstract classes1211.76%
▷ Concrete classes9088.24%
▷ Final classes22.22%
Methods692
▷ Static methods284.05%
▷ Public methods45065.03%
▷ Protected methods21230.64%
▷ Private methods304.34%
Functions6
▷ Named functions350.00%
▷ Anonymous functions350.00%
Constants175
▷ Global constants10.57%
▷ Class constants17499.43%
▷ Public constants174100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
14 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/css/images/ui-bg_flat_75_ffffff_40x100.png0.20KB0.08KB▼ 58.17%
assets/css/images/ui-icons_2e83ff_256x240.png4.44KB4.17KB▼ 6.02%
assets/css/images/ui-bg_glass_95_fef1ec_1x400.png0.32KB0.15KB▼ 54.82%
assets/css/images/ui-bg_glass_65_ffffff_1x400.png0.20KB0.09KB▼ 57.49%
assets/css/images/ui-icons_cd0a0a_256x240.png4.44KB4.17KB▼ 6.02%