84% yml-import-for-woocommerce

Code Review | YML Import for Woocommerce

WordPress plugin YML Import for Woocommerce scored84%from 54 tests.

About plugin

  • Plugin page: yml-import-for-wo...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Oct 20, 2020
  • Latest release: Oct 20, 2020
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: bot11x11 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

90+ active /1,686 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

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

Server-side resources used by YML Import for Woocommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0440.67 ▼0.57
Dashboard /wp-admin3.34 ▲0.0449.73 ▲0.31
Posts /wp-admin/edit.php3.39 ▲0.0450.00 ▼1.05
Add New Post /wp-admin/post-new.php5.92 ▲0.0494.15 ▼7.51
Media Library /wp-admin/upload.php3.27 ▲0.0438.29 ▲3.19

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

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

Browser metrics Passed 4 tests

Checking browser requirements for YML Import for Woocommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.56 ▼0.994.49 ▲2.3442.38 ▼4.60
Dashboard /wp-admin2,206 ▲185.84 ▲0.97101.55 ▼2.1244.49 ▼1.58
Posts /wp-admin/edit.php2,089 ▼01.99 ▼0.0042.09 ▲0.9036.43 ▼3.12
Add New Post /wp-admin/post-new.php1,533 ▲1923.25 ▲5.72646.46 ▼27.4354.45 ▼7.81
Media Library /wp-admin/upload.php1,388 ▲34.25 ▲0.0497.44 ▼12.1347.10 ▲1.99

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts

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
Everything seems fine, however this is by no means 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 take a closer look at the following
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/yml-import-for-woocommerce/includes/table.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_deactivation_hook() in wp-content/plugins/yml-import-for-woocommerce/yml-importer.php:21
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/yml-import-for-woocommerce/includes/table.php on line 2
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/yml-import-for-woocommerce/includes/table.php on line 2

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 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Contributors: The plugin contributors field is not present
Please take inspiration from this readme.txt

yml-import-for-woocommerce/yml-importer.php 92% from 13 tests

Analyzing the main PHP file in "YML Import for Woocommerce" version 1.0
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("yml-import-for-woocommerce.php" instead of "yml-importer.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin943 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP41067943

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.35
Average class complexity35.00
▷ Minimum class complexity5.00
▷ Maximum class complexity92.00
Average method complexity4.49
▷ Minimum method complexity1.00
▷ Maximum method complexity47.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods39
▷ Static methods12.56%
▷ Public methods2051.28%
▷ Protected methods1025.64%
▷ Private methods923.08%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There were not PNG files found in your plugin