89% import-products-to-ok-ru

Code Review | Import Products to OK.ru

WordPress plugin Import Products to OK.ru scored89%from 54 tests.

About plugin

  • Plugin page: import-products-t...
  • Plugin version: 2.0.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.2
  • WordPress version: 6.3.1
  • First release: Sep 9, 2019
  • Latest release: Apr 24, 2023
  • Number of updates: 23
  • Update frequency: every 57.5 days
  • Top authors: icopydoc (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

30+ active /2,014 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

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

Analyzing server-side resources used by Import Products to OK.ru
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0236.01 ▼1.90
Dashboard /wp-admin3.32 ▲0.0246.90 ▼5.33
Posts /wp-admin/edit.php3.37 ▲0.0145.92 ▼2.60
Add New Post /wp-admin/post-new.php5.90 ▲0.0286.79 ▼11.93
Media Library /wp-admin/upload.php3.24 ▲0.0136.02 ▲2.23

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 43 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Import Products to OK.ru
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,794 ▲3314.37 ▲0.441.79 ▲0.1629.73 ▼12.96
Dashboard /wp-admin2,197 ▲205.49 ▼0.1591.14 ▲2.6439.80 ▼3.90
Posts /wp-admin/edit.php2,102 ▲21.98 ▼0.1134.98 ▼3.0534.58 ▼0.73
Add New Post /wp-admin/post-new.php1,539 ▲1318.12 ▼5.00642.48 ▲16.1386.16 ▲29.89
Media Library /wp-admin/upload.php1,408 ▲84.15 ▼0.0198.87 ▼3.6343.88 ▲0.07

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
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options

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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Screenshot #1 (screenshot-4.png) image not found
The official readme.txt might help

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

Analyzing the main PHP file in "Import Products to OK.ru" version 2.0.3
Please take the time to fix the following:
  • Requires at least: The required version number 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 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin4,965 lines of code in 29 files:
LanguageFilesBlank linesComment linesLines of code
PHP274911,1174,382
PO File15041,018551
CSS10132

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity19.48
▷ Minimum class complexity1.00
▷ Maximum class complexity50.00
Average method complexity2.75
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces0
Interfaces0
Traits6
Classes15
▷ Abstract classes00.00%
▷ Concrete classes15100.00%
▷ Final classes960.00%
Methods214
▷ Static methods62.80%
▷ Public methods13964.95%
▷ Protected methods115.14%
▷ Private methods6429.91%
Functions36
▷ Named functions2466.67%
▷ Anonymous functions1233.33%
Constants13
▷ Global constants1184.62%
▷ Class constants215.38%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
4 PNG files occupy 0.33MB with 0.20MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png94.53KB35.97KB▼ 61.94%
screenshot-4.png67.43KB26.59KB▼ 60.57%
screenshot-2.png89.59KB35.92KB▼ 59.91%
screenshot-3.png87.57KB32.03KB▼ 63.43%