89% import-products-to-vk

Code Review | Import Products to VK

WordPress plugin Import Products to VK scored89%from 54 tests.

About plugin

  • Plugin page: import-products-t...
  • Plugin version: 0.4.7
  • PHP compatiblity: 7.0.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.4.1
  • WordPress version: 6.3.1
  • First release: Apr 5, 2023
  • Latest release: Nov 27, 2023
  • Number of updates: 35
  • Update frequency: every 6.7 days
  • Top authors: icopydoc (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,388 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
Install script ran successfully

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

Server-side resources used by Import Products to VK
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0234.27 ▼5.65
Dashboard /wp-admin3.32 ▼0.0245.22 ▼17.93
Posts /wp-admin/edit.php3.37 ▲0.0244.69 ▲0.11
Add New Post /wp-admin/post-new.php5.90 ▲0.0281.82 ▼17.75
Media Library /wp-admin/upload.php3.24 ▲0.0235.93 ▲2.27

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Import Products to VK
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3314.32 ▼0.031.72 ▲0.0226.58 ▼15.64
Dashboard /wp-admin2,200 ▲195.59 ▼0.1394.39 ▼19.5243.13 ▼1.65
Posts /wp-admin/edit.php2,105 ▲22.00 ▲0.0440.42 ▲0.6141.67 ▲9.17
Add New Post /wp-admin/post-new.php1,531 ▲523.05 ▼0.08635.41 ▼59.1152.59 ▼4.39
Media Library /wp-admin/upload.php1,399 ▲24.18 ▲0.0196.43 ▼1.3146.35 ▲5.33

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

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Screenshots: Screenshot #1 (screenshot-2.png) image required
The official readme.txt is a good inspiration

import-products-to-vk/import-products-to-vk.php 92% from 13 tests

Analyzing the main PHP file in "Import Products to VK" version 0.4.7
It is important to fix the following:
  • Requires at least: Required version must match the one declared in readme.txt ("4.5" instead of "4.7")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected6,913 lines of code in 34 files:
LanguageFilesBlank linesComment linesLines of code
PHP306572,2126,368
PO File15481,124531
CSS10110
JavaScript2014

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity22.35
▷ Minimum class complexity1.00
▷ Maximum class complexity80.00
Average method complexity2.79
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits6
Classes17
▷ Abstract classes00.00%
▷ Concrete classes17100.00%
▷ Final classes1270.59%
Methods265
▷ Static methods62.26%
▷ Public methods18168.30%
▷ Protected methods124.53%
▷ Private methods7227.17%
Functions41
▷ Named functions2765.85%
▷ Anonymous functions1434.15%
Constants13
▷ Global constants1184.62%
▷ Class constants215.38%
▷ Public constants2100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
8 PNG files occupy 0.99MB with 0.64MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/instruction-1.png60.71KB20.44KB▼ 66.33%
img/instruction-2.png59.38KB20.13KB▼ 66.11%
screenshot-2.png87.15KB34.27KB▼ 60.68%
img/instruction-5.png389.33KB140.83KB▼ 63.83%
img/instruction-3.png93.65KB31.25KB▼ 66.64%