10% avk-shop

Code Review | AVK-Shop

WordPress plugin AVK-Shop scored10%from 54 tests.

About plugin

  • Plugin page: avk-shop
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-4.4
  • WordPress version: 6.3.1
  • First release: Jul 10, 2015
  • Latest release: Dec 9, 2015
  • Number of updates: 12
  • Update frequency: every 12.7 days
  • Top authors: Smiling_Hemp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,268 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
You still need to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/avk-shop/includes/features.class.php+15
    Undefined index: page

Server metrics [RAM: ▼1.01MB] [CPU: ▼48.28ms] Passed 4 tests

Analyzing server-side resources used by AVK-Shop
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.98 ▼0.489.17 ▼30.26
Dashboard /wp-admin3.00 ▼0.3011.03 ▼36.10
Posts /wp-admin/edit.php3.00 ▼0.3611.65 ▼39.03
Add New Post /wp-admin/post-new.php3.00 ▼2.899.93 ▼87.73
Media Library /wp-admin/upload.php3.00 ▼0.2310.11 ▼26.46

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 110 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-comments
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for AVK-Shop
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,096 ▲33513.65 ▼0.757.06 ▲5.3345.59 ▲3.57
Dashboard /wp-admin2,315 ▲1124.88 ▼0.02109.76 ▲3.7442.42 ▲2.00
Posts /wp-admin/edit.php2,197 ▲972.00 ▼0.0034.80 ▼5.8143.88 ▲7.69
Add New Post /wp-admin/post-new.php1,610 ▲6523.10 ▼0.21503.23 ▼182.31107.22 ▲47.76
Media Library /wp-admin/upload.php1,494 ▲944.17 ▼0.01102.23 ▼4.6047.54 ▼0.17

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/avk-shop/includes/features.class.php+15
    Undefined index: page
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 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
Please fix the following
  • 12× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined index: page in wp-content/plugins/avk-shop/includes/features.class.php on line 15
    • > PHP Fatal error
      Uncaught Error: Class 'libraryAVKShop' not found in wp-content/plugins/avk-shop/modules/customer-information/module-customer-information.class.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/avk-shop/pages/sidebar.php:8
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/avk-shop/pages/main_menu.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'AVKShopVariables' not found in wp-content/plugins/avk-shop/includes/features.class.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'MainValueAvkShop' not found in wp-content/plugins/avk-shop/includes/html.class.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/avk-shop/avkshop-engine.class.php:174
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/avk-shop/pages/action_file.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/avk-shop/includes/widget.class.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/avk-shop/pages/tables.php:9

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

readme.txt 81% 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 require attention:
  • Tags: Please reduce the number of tags, currently 39 tag instead of maximum 10
  • Screenshots: Add images for these screenshots: #1 (Page main settings), #2 (Page payment systems and log), #3 (Page tools), #4 (Add items to the editor)
  • Donate link: Invalid URI found ("goo.gl/3Ux5gD")
You can take inspiration from this readme.txt

avk-shop/avkshop-engine.class.php 92% from 13 tests

The main PHP file in "AVK-Shop" ver. 1.1.1 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("avk-shop.php" instead of "avkshop-engine.class.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected7,587 lines of code in 36 files:
LanguageFilesBlank linesComment linesLines of code
PHP153041953,338
CSS954922,530
PO File1319350925
JavaScript1198264794

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity46.36
▷ Minimum class complexity1.00
▷ Maximum class complexity184.00
Average method complexity4.54
▷ Minimum method complexity1.00
▷ Maximum method complexity32.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods141
▷ Static methods10.71%
▷ Public methods7855.32%
▷ Protected methods4733.33%
▷ Private methods1611.35%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants13
▷ Global constants969.23%
▷ Class constants430.77%
▷ Public constants4100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
43 PNG files occupy 0.54MB with 0.27MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/button/basket_full.png9.75KB3.31KB▼ 66.08%
images/soc/facebook.png2.04KB1.30KB▼ 36.41%
images/button/login.png1.66KB1.33KB▼ 20.08%
images/question.png4.47KB1.63KB▼ 63.63%
images/button/download_green.png18.11KB5.95KB▼ 67.17%