84% import-products-variations-and-attributes-free-by-wp-masters

Code Review | Import Products, Variations and Attributes - Free by WP Masters

WordPress plugin Import Products, Variations and Attributes - Free by WP Masters scored 84% from 54 tests.

About plugin

  • Plugin page: import-products-v...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.1
  • WordPress version: 6.3.1
  • First release: Jul 15, 2022
  • Latest release: Dec 18, 2022
  • Number of updates: 9
  • Update frequency: every 28.4 days
  • Top authors: wpmasterscom (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active / 1,629 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by Import Products, Variations and Attributes - Free by WP Masters
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0146.15 ▲1.44
Dashboard /wp-admin3.32 ▲0.0155.67 ▼2.02
Posts /wp-admin/edit.php3.37 ▲0.0176.81 ▲20.64
Add New Post /wp-admin/post-new.php5.92 ▲0.03104.28 ▲6.60
Media Library /wp-admin/upload.php3.24 ▲0.0142.17 ▲0.33

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 29 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Import Products, Variations and Attributes - Free by WP Masters
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,835 ▲4615.48 ▲0.681.89 ▲0.0341.87 ▼5.57
Dashboard /wp-admin2,244 ▲387.28 ▲1.43123.49 ▲16.4441.09 ▼0.72
Posts /wp-admin/edit.php2,124 ▲353.98 ▲1.9351.49 ▲10.7636.64 ▲2.71
Add New Post /wp-admin/post-new.php6,544 ▲5,00826.99 ▲3.931,096.79 ▲422.0341.92 ▼8.18
Media Library /wp-admin/upload.php1,423 ▲326.69 ▲2.50125.77 ▲26.5448.48 ▲4.54

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/media.php' (include_path='.:/usr/share/php') in wp-content/plugins/import-products-variations-and-attributes-free-by-wp-masters/wpm-import-products-variations-attributes.php on line 17
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/import-products-variations-and-attributes-free-by-wp-masters/wpm-import-products-variations-attributes.php on line 17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/import-products-variations-and-attributes-free-by-wp-masters/templates/admin/settings.php:19
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/media.php): failed to open stream: No such file or directory in wp-content/plugins/import-products-variations-and-attributes-free-by-wp-masters/wpm-import-products-variations-attributes.php on line 17

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 Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
6 plugin tags: create attributes on import, import products and attributes, import variations, import products, variations with attributes...

import-products-variations-and-attributes-free-by-wp-masters/wpm-import-products-variations-attributes.php 85% from 13 tests

"Import Products, Variations and Attributes - Free by WP Masters" version 1.0.0'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 ("import-products-variations-and-attributes-free-by-wp-masters.php" instead of "wpm-import-products-variations-attributes.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

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 plugin12,076 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
SVG3009,552
PHP42372911,300
CSS31495906
JavaScript3115318

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity70.33
▷ Minimum class complexity4.00
▷ Maximum class complexity167.00
Average method complexity5.24
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods50
▷ Static methods612.00%
▷ Public methods4080.00%
▷ Protected methods1020.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
templates/assets/img/logo.png11.32KB4.55KB▼ 59.79%