77% try-on-for-woocommerce

Code Review | SpecFit-Virtual Try On Woocommerce

WordPress plugin SpecFit-Virtual Try On Woocommerce scored77%from 54 tests.

About plugin

  • Plugin page: try-on-for-woocom...
  • Plugin version: 6.0.4
  • PHP compatiblity: 5.6.40+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.2
  • WordPress version: 6.3.1
  • First release: Jul 4, 2018
  • Latest release: Nov 11, 2023
  • Number of updates: 106
  • Update frequency: every 18.5 days
  • Top authors: dugudlabs (100%)

Code review

54 tests

User reviews

16 reviews

Install metrics

60+ active /6,595 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.12MB] [CPU: ▼10.51ms] Passed 4 tests

An overview of server-side resources used by SpecFit-Virtual Try On Woocommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1338.23 ▼6.46
Dashboard /wp-admin3.43 ▲0.0848.12 ▼13.00
Posts /wp-admin/edit.php3.54 ▲0.1848.26 ▼2.20
Add New Post /wp-admin/post-new.php6.03 ▲0.1483.64 ▼20.39
Media Library /wp-admin/upload.php3.35 ▲0.1243.39 ▲11.79

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

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

Browser metrics Passed 4 tests

A check of browser resources used by SpecFit-Virtual Try On Woocommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,826 ▲7914.28 ▲0.001.92 ▲0.2342.32 ▼0.84
Dashboard /wp-admin2,219 ▲395.57 ▼0.0688.20 ▼13.3169.45 ▲24.41
Posts /wp-admin/edit.php2,154 ▲512.22 ▲0.2639.12 ▲3.9235.11 ▼0.43
Add New Post /wp-admin/post-new.php1,716 ▲19022.25 ▼0.71591.02 ▲19.6733.93 ▼17.77
Media Library /wp-admin/upload.php1,446 ▲524.21 ▲0.04109.59 ▲12.3647.16 ▲3.54

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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 take a closer look at the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/try-on-for-woocommerce/public/partials/eyewear_virtual_try_on_wordpress-public-try-on.php
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/try-on-for-woocommerce/admin/partials/eyewear_virtual_try_on_wordpress-admin-display.php:37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/try-on-for-woocommerce/public/partials/eyewear_virtual_try_on_wordpress-public-display-new.php:23

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

readme.txt 88% 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
Attributes that require attention:
  • Screenshots: Please a description for screenshot #8 in try-on-for-woocommerce/assets to your readme.txt
  • Screenshots: Screenshot #7 (Frontend Page: Live try on using webcam) image missing
The official readme.txt might help

try-on-for-woocommerce/eyewear_virtual_try_on_wordpress.php 77% from 13 tests

The principal PHP file in "SpecFit-Virtual Try On Woocommerce" v. 6.0.4 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("try-on-for-woocommerce.php" instead of "eyewear_virtual_try_on_wordpress.php")
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase
  • Description: The description should be shorter than 140 characters (currently 182 characters long)

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
Good job! No executable or dangerous file extensions detected80,259 lines of code in 35 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript148,73854,64677,634
CSS470451,814
PHP14154544696
Markdown126060
SVG20155

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity4.43
▷ Minimum class complexity1.00
▷ Maximum class complexity19.00
Average method complexity1.86
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods28
▷ Static methods27.14%
▷ Public methods2382.14%
▷ Protected methods00.00%
▷ Private methods517.86%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.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.03MB with 0.01MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/partials/images/SpecFit-logos_transparent.png10.61KB10.59KB0.17%
public/partials/images/SpecFit-logos_black.png11.50KB11.48KB0.17%
admin/css/upload.png3.15KB2.08KB▼ 34.10%
admin/partials/images/SpecFit.png6.22KB3.54KB▼ 43.11%