78% digikalascraper

Code Review | digikalaScraper – دیجی کالا اسکرپر

WordPress plugin digikalaScraper – دیجی کالا اسکرپر scored78%from 54 tests.

About plugin

  • Plugin page: digikalascraper
  • Plugin version: 0.0.8
  • PHP compatiblity: 8.1+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Oct 5, 2022
  • Latest release: Mar 13, 2023
  • Number of updates: 21
  • Update frequency: every 7.7 days
  • Top authors: ibehroozir (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /593 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.19MB] [CPU: ▼8.87ms] Passed 4 tests

A check of server-side resources used by digikalaScraper – دیجی کالا اسکرپر
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1242.62 ▲3.61
Dashboard /wp-admin3.54 ▲0.1745.94 ▼14.09
Posts /wp-admin/edit.php3.64 ▲0.2551.15 ▲3.07
Add New Post /wp-admin/post-new.php6.23 ▲0.3177.98 ▼25.33
Media Library /wp-admin/upload.php3.48 ▲0.2234.64 ▲0.87

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: no files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
IB_digikalaScraper_settings
db_upgraded
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

digikalaScraper – دیجی کالا اسکرپر: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,820 ▲7413.22 ▼1.181.76 ▼0.0446.33 ▲7.49
Dashboard /wp-admin2,222 ▲344.86 ▼0.02108.93 ▼7.4842.06 ▼3.78
Posts /wp-admin/edit.php2,102 ▲102.05 ▲0.0540.39 ▲4.1934.54 ▲4.62
Add New Post /wp-admin/post-new.php1,555 ▲3618.36 ▼4.86616.24 ▼72.5057.08 ▼0.83
Media Library /wp-admin/upload.php1,407 ▲164.18 ▲0.0798.50 ▼1.2641.29 ▼1.30

Uninstaller [IO: ✅] [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
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • IB_digikalaScraper_settings

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 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
Please fix the following
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/digikalascraper/include/ib.php
    • > /wp-content/plugins/digikalascraper/digikalaScraper.php
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/digikalascraper/include/panel.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% 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:
  • Screenshots: A description for screenshot #4 is missing in digikalascraper/assets to your readme.txt
  • Requires at least: Invalid plugin version format
You can look at the official readme.txt

digikalascraper/digikalaScraper.php 92% from 13 tests

The principal PHP file in "digikalaScraper – دیجی کالا اسکرپر" v. 0.0.8 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("digikalascraper.php" instead of "digikalaScraper.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected1,326 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP45115928
CSS23620351
JavaScript110047

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity121.00
▷ Minimum class complexity121.00
▷ Maximum class complexity121.00
Average method complexity3.93
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods41
▷ Static methods00.00%
▷ Public methods41100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants8
▷ Global constants337.50%
▷ Class constants562.50%
▷ Public constants5100.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
3 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/star.png0.65KB0.36KB▼ 45.59%
assets/img/cart.png0.93KB0.55KB▼ 40.51%
assets/img/specialsell.png1.21KB1.18KB▼ 2.11%