84% export-variable-products

Code Review | Export Variable Products

WordPress plugin Export Variable Products scored84%from 54 tests.

About plugin

  • Plugin page: export-variable-p...
  • Plugin version: 1.2.5
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.2
  • WordPress version: 6.3.1
  • First release: Dec 23, 2019
  • Latest release: May 1, 2023
  • Number of updates: 15
  • Update frequency: every 81.7 days
  • Top authors: fahadmahmood (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

400+ active /3,440 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
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by Export Variable Products
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1547.98 ▲7.24
Dashboard /wp-admin3.32 ▼0.0345.41 ▼12.17
Posts /wp-admin/edit.php3.37 ▲0.0148.91 ▲0.75
Add New Post /wp-admin/post-new.php5.90 ▲0.01100.90 ▲2.74
Media Library /wp-admin/upload.php3.24 ▲0.0135.22 ▼0.15

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Export Variable Products
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.68 ▼0.682.03 ▲0.2541.17 ▼1.55
Dashboard /wp-admin2,209 ▲214.89 ▼0.1695.28 ▼11.5140.90 ▼3.61
Posts /wp-admin/edit.php2,089 ▼32.04 ▲0.0039.42 ▼0.5637.30 ▲1.69
Add New Post /wp-admin/post-new.php1,542 ▲2318.48 ▼4.79612.54 ▼66.5648.08 ▼8.49
Media Library /wp-admin/upload.php1,391 ▲34.18 ▼0.07100.97 ▼15.4144.26 ▼6.66

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
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/export-variable-products/inc/admin_settings.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: import, porducts, csv export, export productes

export-variable-products/index.php 85% from 13 tests

The principal PHP file in "Export Variable Products" v. 1.2.5 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("export-variable-products.php" instead of "index.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

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
Everything looks great! No dangerous files found in this plugin14,768 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
CSS21,21389,078
JavaScript28643303,384
PHP54863592,039
PO File3108108267

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity114.67
▷ Minimum class complexity12.00
▷ Maximum class complexity194.00
Average method complexity4.97
▷ Minimum method complexity1.00
▷ Maximum method complexity36.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods86
▷ Static methods1416.28%
▷ Public methods6069.77%
▷ Protected methods1416.28%
▷ Private methods1213.95%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants114.29%
▷ Class constants685.71%
▷ Public constants6100.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
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/edit_page.png15.12KB7.45KB▼ 50.71%
img/woo.png5.93KB3.17KB▼ 46.59%