83% jewelfit-virtual-jewellery-try-on

Code Review | JewelFit-Virtual Jewellery Try On Woocommerce

WordPress plugin JewelFit-Virtual Jewellery Try On Woocommerce scored83%from 54 tests.

About plugin

  • Plugin page: jewelfit-virtual-...
  • Plugin version: 2.0.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-6.0
  • WordPress version: 6.3.1
  • First release: Jul 3, 2019
  • Latest release: Aug 12, 2022
  • Number of updates: 16
  • Update frequency: every 71.1 days
  • Top authors: dugudlabs (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

10+ active /2,063 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▼0.17MB] [CPU: ▼7.60ms] Passed 4 tests

Server-side resources used by JewelFit-Virtual Jewellery Try On Woocommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0337.67 ▲0.50
Dashboard /wp-admin3.32 ▲0.0245.82 ▼1.13
Posts /wp-admin/edit.php3.37 ▲0.0245.78 ▲1.42
Add New Post /wp-admin/post-new.php5.15 ▼0.7461.19 ▼29.98
Media Library /wp-admin/upload.php3.24 ▲0.0234.29 ▲0.21

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 40 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

JewelFit-Virtual Jewellery Try On Woocommerce: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,984 ▲24914.59 ▲0.2110.92 ▲9.1048.72 ▲4.20
Dashboard /wp-admin2,223 ▲385.79 ▼0.04106.60 ▲4.5240.34 ▼0.81
Posts /wp-admin/edit.php2,124 ▲352.25 ▲0.2439.95 ▲3.9533.71 ▼1.00
Add New Post /wp-admin/post-new.php6,335 ▲4,80222.19 ▼1.07842.60 ▲177.3967.69 ▲16.05
Media Library /wp-admin/upload.php1,416 ▲314.25 ▼0.0296.79 ▲2.1644.49 ▲3.05

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 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
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 5× PHP files trigger server errors when accessed directly:
    • > PHP Warning
      include_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/jewelfit-virtual-jewellery-try-on/public/partials/virtual-jewellery-try-on-public-display.php on line 14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/jewelfit-virtual-jewellery-try-on/public/partials/virtual-jewellery-try-on-public-display.php:76
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/jewelfit-virtual-jewellery-try-on/admin/partials/virtual-jewellery-try-on-admin-display.php:40
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHwp-admin/includes/plugin.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/jewelfit-virtual-jewellery-try-on/public/partials/virtual-jewellery-try-on-public-display.php on line 14
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/jewelfit-virtual-jewellery-try-on/public/partials/virtual-jewellery-try-on-public-display.php on line 14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 87% 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:
  • Requires php: Version not formatted correctly
  • Screenshots: Add images for these screenshots: #1 (Set Try On Image), #2 (Try On pop up)
The official readme.txt might help

jewelfit-virtual-jewellery-try-on/virtual-jewellery-try-on.php 85% from 13 tests

Analyzing the main PHP file in "JewelFit-Virtual Jewellery Try On Woocommerce" version 2.0.7
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("jewelfit-virtual-jewellery-try-on.php" instead of "virtual-jewellery-try-on.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin5,802 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript64662692,927
CSS770762,425
PHP12203546436
SVG11014

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity3.29
▷ Minimum class complexity1.00
▷ Maximum class complexity14.00
Average method complexity1.57
▷ Minimum method complexity1.00
▷ Maximum method complexity10.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%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.45MB with 0.39MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
(invalid) public/images/female.png216.90KB0.00KB▼ 100.00%
(invalid) public/partials/images/female.png216.90KB0.00KB▼ 100.00%
admin/partials/images/jewelfit_plans.png31.53KB13.89KB▼ 55.94%