77% smart-quick-view

Code Review | Smart Quick View for WooCommerce

WordPress plugin Smart Quick View for WooCommerce scored77%from 54 tests.

About plugin

  • Plugin page: smart-quick-view
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.9
  • WordPress version: 6.3.1
  • First release: Apr 22, 2022
  • Latest release: Apr 22, 2022
  • Number of updates: 10
  • Update frequency: N/A
  • Top authors: neblabs (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /247 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: ▲2.40MB] [CPU: ▲16.91ms] Passed 4 tests

An overview of server-side resources used by Smart Quick View for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.44 ▲0.9854.64 ▲17.19
Dashboard /wp-admin6.19 ▲2.8866.53 ▲17.88
Posts /wp-admin/edit.php6.24 ▲2.8868.42 ▲21.58
Add New Post /wp-admin/post-new.php8.77 ▲2.88114.04 ▲10.98
Media Library /wp-admin/upload.php6.11 ▲2.8862.57 ▲24.46

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 744 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Smart Quick View for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.35 ▲0.031.75 ▼0.2442.00 ▼2.69
Dashboard /wp-admin2,195 ▲185.62 ▲0.0292.65 ▼0.4237.92 ▼4.98
Posts /wp-admin/edit.php2,100 ▼02.01 ▼0.1039.11 ▲2.5036.20 ▲1.16
Add New Post /wp-admin/post-new.php1,526 ▼023.33 ▼0.29671.22 ▲6.3355.54 ▼5.18
Media Library /wp-admin/upload.php1,403 ▲34.17 ▼0.08102.34 ▼5.9443.97 ▼3.47

Uninstaller [IO: ▲0.00MB] [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
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts

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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 4× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/smart-quick-view/app/views/defaultpopupskeleton.php
    • > /wp-content/plugins/smart-quick-view/vendor/mustangostang/spyc/examples/yaml-load.php
    • > /wp-content/plugins/smart-quick-view/vendor/mustangostang/spyc/php4/5to4.php
    • > /wp-content/plugins/smart-quick-view/app/views/popupmarkup.php
  • 250× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'DeviceDetector\\Parser\\ParserAbstract' not found in wp-content/plugins/smart-quick-view/vendor/piwik/device-detector/Parser/Device/DeviceParserAbstract.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Kirki\\Control\\Base' not found in wp-content/plugins/smart-quick-view/vendor/kirki/packages/kirki-framework/control-image/src/Control/Image.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'SmartQuickView\\App\\Components\\Popup' not found in wp-content/plugins/smart-quick-view/app/components/defaultpopup.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/smart-quick-view/vendor/symfony/translation/Tests/Catalogue/AbstractOperationTest.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Customize_Setting' not found in wp-content/plugins/smart-quick-view/vendor/kirki/packages/kirki-framework/util/src/Setting/Site_Option.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/smart-quick-view/vendor/symfony/translation/Tests/Dumper/YamlFileDumperTest.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'SmartQuickView\\Original\\Collections\\Mapper\\Mappable' not found in wp-content/plugins/smart-quick-view/app/data/preferences/preferences.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'DeviceDetector\\Parser\\Device\\DeviceParserAbstract' not found in wp-content/plugins/smart-quick-view/vendor/piwik/device-detector/Parser/Device/PortableMediaPlayer.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/smart-quick-view/vendor/mustangostang/spyc/tests/LoadTest.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/smart-quick-view/vendor/symfony/translation/Tests/TranslatorCacheTest.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% 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
Attributes that require attention: You can look at the official readme.txt

smart-quick-view/smartquickview.php 85% from 13 tests

"Smart Quick View for WooCommerce" version 1.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("smart-quick-view.php" instead of "smartquickview.php")

Code Analysis 97% from 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
There were no executable files found in this plugin75,961 lines of code in 623 files:
LanguageFilesBlank linesComment linesLines of code
PHP3926,56014,54727,216
JSON520016,365
JavaScript963,4195,08614,770
YAML261,25482110,038
XSD499764,991
Markdown746701,184
CSS21218267940
XML1630318
SVG10091
PO File67037
Qt Linguist10010
INI1001

PHP code 50% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
It is recommended to fix the following
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 157)
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity10.00
▷ Minimum class complexity1.00
▷ Maximum class complexity257.00
Average method complexity2.72
▷ Minimum method complexity1.00
▷ Maximum method complexity157.00
Code structure
Namespaces82
Interfaces17
Traits2
Classes338
▷ Abstract classes247.10%
▷ Concrete classes31492.90%
▷ Final classes103.18%
Methods1,897
▷ Static methods28214.87%
▷ Public methods1,50079.07%
▷ Protected methods26313.86%
▷ Private methods1347.06%
Functions155
▷ Named functions5535.48%
▷ Anonymous functions10064.52%
Constants56
▷ Global constants610.71%
▷ Class constants5089.29%
▷ Public constants50100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
8 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor/kirki/assets/images/3cr.png0.91KB0.32KB▼ 64.81%
vendor/kirki/assets/images/2cl.png0.85KB0.27KB▼ 68.48%
vendor/kirki/assets/images/jquery.fs.stepper-arrows.png0.30KB0.18KB▼ 40.52%
vendor/kirki/assets/images/kirki-bottom.png1.51KB1.09KB▼ 27.89%
vendor/kirki/assets/images/3cl.png0.91KB0.32KB▼ 64.26%