83% awesome-quick-viewer-for-woocommerce

Code Review | Awesome Quick Viewer for WooCommerce Lite

WordPress plugin Awesome Quick Viewer for WooCommerce Lite scored83%from 54 tests.

About plugin

  • Plugin page: awesome-quick-vie...
  • Plugin version: 1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.8
  • WordPress version: 6.3.1
  • First release: Oct 12, 2021
  • Latest release: Oct 25, 2021
  • Number of updates: 24
  • Update frequency: every 0.5 days
  • Top authors: rafiul17 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /431 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.04MB] [CPU: ▼4.17ms] Passed 4 tests

A check of server-side resources used by Awesome Quick Viewer for WooCommerce Lite
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0540.60 ▲3.79
Dashboard /wp-admin3.34 ▲0.0447.95 ▼1.95
Posts /wp-admin/edit.php3.39 ▲0.0446.28 ▼1.99
Add New Post /wp-admin/post-new.php5.92 ▲0.0488.32 ▼5.24
Media Library /wp-admin/upload.php3.26 ▲0.0430.53 ▼7.50

Server storage [IO: ▲0.85MB] [DB: ▲0.07MB] Passed 3 tests

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 92 new files
Database: no new tables, 8 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_recent-posts
awqv_lite_version
awqv_lite_activation_date

Browser metrics Passed 4 tests

Awesome Quick Viewer for WooCommerce Lite: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,916 ▲15513.52 ▼1.0311.01 ▲9.4644.87 ▲6.48
Dashboard /wp-admin2,197 ▲265.63 ▲0.0489.65 ▲3.2540.90 ▲0.17
Posts /wp-admin/edit.php2,102 ▲22.00 ▼0.0039.62 ▲4.4636.63 ▼1.61
Add New Post /wp-admin/post-new.php1,537 ▲918.43 ▼4.74640.74 ▼30.9058.98 ▲3.49
Media Library /wp-admin/upload.php1,405 ▲54.20 ▲0.0199.01 ▼1.4943.41 ▼0.92

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 8 options
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • awqv_lite_version
    • widget_theysaidso_widget
    • widget_recent-posts
    • awqv_lite_activation_date
    • db_upgraded

Smoke tests 75% from 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)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 11× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: wp_customize in wp-content/plugins/awesome-quick-viewer-for-woocommerce/includes/customizers/cutomizer-controls/controls/customizer-slider.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/awesome-quick-viewer-for-woocommerce/includes/customizers/cutomizer-controls/controls/typography-control/ctypo.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/awesome-quick-viewer-for-woocommerce/includes/customizers/customizer.php:466
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Customize_Control' not found in wp-content/plugins/awesome-quick-viewer-for-woocommerce/includes/customizers/cutomizer-controls/controls/typography-control/control-typography.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Customize_Control' not found in wp-content/plugins/awesome-quick-viewer-for-woocommerce/includes/customizers/cutomizer-controls/controls/range-control/class-customizer-range-value-control.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Customize_Control' not found in wp-content/plugins/awesome-quick-viewer-for-woocommerce/includes/customizers/cutomizer-controls/controls/toggle-control/class-customizer-toggle-control.php:3
    • > PHP Notice
      Undefined variable: wp_customize in wp-content/plugins/awesome-quick-viewer-for-woocommerce/includes/customizers/cutomizer-controls/controls/customizer-animation.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/awesome-quick-viewer-for-woocommerce/includes/awqv-style.php:8
    • > PHP Fatal error
      Uncaught Error: Call to a member function add_setting() on null in wp-content/plugins/awesome-quick-viewer-for-woocommerce/includes/customizers/cutomizer-controls/controls/customizer-slider.php:2
    • > PHP Fatal error
      Uncaught Error: Call to a member function add_setting() on null in wp-content/plugins/awesome-quick-viewer-for-woocommerce/includes/customizers/cutomizer-controls/controls/customizer-animation.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 80% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes: You can look at the official readme.txt

awesome-quick-viewer-for-woocommerce/init.php 62% from 13 tests

The entry point to "Awesome Quick Viewer for WooCommerce Lite" version 1.0 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Requires PHP: The required version number must match the one declared in readme.txt ("5.4" instead of "7.0")
  • Requires at least: The required version number must match the one declared in readme.txt ("5.0" instead of "5.2")
  • Domain Path: The domain path points to an invalid folder, "/languages/" does not exist
  • Main file name: The principal plugin file should be the same as the plugin slug ("awesome-quick-viewer-for-woocommerce.php" instead of "init.php")

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
There were no executable files found in this plugin10,952 lines of code in 76 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript209831,6495,324
CSS221001753,028
PHP202334571,508
LESS96861726
JSON100230
Markdown128077
SVG322059

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity3.33
▷ Minimum class complexity1.00
▷ Maximum class complexity12.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes00.00%
Methods56
▷ Static methods916.07%
▷ Public methods5598.21%
▷ Protected methods11.79%
▷ Private methods00.00%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants888.89%
▷ Class constants111.11%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.05MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/arrow.png0.30KB0.24KB▼ 21.61%
includes/customizers/cutomizer-controls/controls/range-control/assets/customizer-range-value-suffix.png49.86KB15.08KB▼ 69.75%