90% import-from-yml

Code Review | Import from YML

WordPress plugin Import from YML scored90%from 54 tests.

About plugin

  • Plugin page: import-from-yml
  • Plugin version: 3.1.0
  • PHP compatiblity: 7.0.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.4.1
  • WordPress version: 6.3.1
  • First release: Feb 3, 2021
  • Latest release: Nov 14, 2023
  • Number of updates: 69
  • Update frequency: every 14.7 days
  • Top authors: icopydoc (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

600+ active /12,871 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼0.35ms] Passed 4 tests

Analyzing server-side resources used by Import from YML
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0241.99 ▲1.94
Dashboard /wp-admin3.32 ▲0.0247.70 ▲0.66
Posts /wp-admin/edit.php3.37 ▲0.0244.63 ▼1.22
Add New Post /wp-admin/post-new.php5.90 ▲0.0283.49 ▼2.76
Media Library /wp-admin/upload.php3.24 ▲0.0235.10 ▲3.55

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Import from YML
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,820 ▲5814.18 ▼0.092.07 ▲0.4634.70 ▼4.57
Dashboard /wp-admin2,197 ▲205.49 ▼0.1387.05 ▼3.1641.02 ▲2.40
Posts /wp-admin/edit.php2,105 ▲52.01 ▲0.0536.54 ▼3.9637.95 ▲2.57
Add New Post /wp-admin/post-new.php1,540 ▲1424.83 ▲1.43602.18 ▼13.4357.70 ▲5.06
Media Library /wp-admin/upload.php1,405 ▲54.28 ▲0.0798.17 ▼8.0544.31 ▲2.48

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
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
The SRP test was a success

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

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Screenshots: Screenshot #1 (screenshot-2.png) image missing
The official readme.txt is a good inspiration

import-from-yml/import-from-yml.php Passed 13 tests

The principal PHP file in "Import from YML" v. 3.1.0 is loaded by WordPress automatically on each request
39 characters long description:
Import products from YML to WooCommerce

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected8,170 lines of code in 46 files:
LanguageFilesBlank linesComment linesLines of code
PHP447142,8537,595
PO File15241,083544
CSS10131

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity24.46
▷ Minimum class complexity1.00
▷ Maximum class complexity77.00
Average method complexity2.99
▷ Minimum method complexity1.00
▷ Maximum method complexity40.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes24
▷ Abstract classes00.00%
▷ Concrete classes24100.00%
▷ Final classes937.50%
Methods283
▷ Static methods155.30%
▷ Public methods14250.18%
▷ Protected methods51.77%
▷ Private methods13648.06%
Functions55
▷ Named functions4581.82%
▷ Anonymous functions1018.18%
Constants17
▷ Global constants1376.47%
▷ Class constants423.53%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.41MB with 0.28MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png203.38KB63.22KB▼ 68.92%
screenshot-2.png215.92KB65.99KB▼ 69.44%