89% ar-for-woocommerce

Code Review | AR For Woocommerce

WordPress plugin AR For Woocommerce scored89%from 54 tests.

About plugin

  • Plugin page: ar-for-woocommerce
  • Plugin version: 5.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-6.4.1
  • WordPress version: 6.3.1
  • First release: Oct 5, 2017
  • Latest release: Nov 23, 2023
  • Number of updates: 234
  • Update frequency: every 9.6 days
  • Top authors: webandprint (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active /9,769 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
Installer ran successfully

Server metrics [RAM: ▲0.81MB] [CPU: ▲3.54ms] Passed 4 tests

This is a short check of server-side resources used by AR For Woocommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.26 ▲0.7943.38 ▲7.75
Dashboard /wp-admin4.11 ▲0.8052.04 ▲3.01
Posts /wp-admin/edit.php4.23 ▲0.8655.30 ▲2.74
Add New Post /wp-admin/post-new.php6.73 ▲0.8493.14 ▲0.67
Media Library /wp-admin/upload.php4.06 ▲0.8241.47 ▲8.50

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 65 new files
Database: no new tables, 35 new options
New WordPress options
ar_hide_arview
ar_rotate_limit
theysaidso_admin_options
ar_licence_renewal
ar_hide_qrcode
ar_dimensions_units
ar_scene_viewer
ar_qr_file
ar_wl_file
widget_ar_for_woocommerce_widget
...

Browser metrics Passed 4 tests

An overview of browser requirements for AR For Woocommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,837 ▲7514.37 ▲0.031.64 ▲0.0128.00 ▼10.66
Dashboard /wp-admin2,238 ▲585.57 ▼0.0594.86 ▼0.4787.33 ▲43.05
Posts /wp-admin/edit.php2,147 ▲442.08 ▲0.0840.74 ▼0.4641.09 ▲6.93
Add New Post /wp-admin/post-new.php6,235 ▲4,70019.23 ▼5.661,031.01 ▲398.7839.67 ▼31.50
Media Library /wp-admin/upload.php1,443 ▲434.20 ▼0.0094.91 ▲0.1283.17 ▲42.12

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
These items require your attention
  • The uninstall procedure has failed, leaving 35 options in the database
    • ar_dimensions_units
    • ar_hide_dimensions
    • ar_licence_key
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • ar_fullscreen_file
    • ar_open_tabs_remember
    • ar_open_tabs
    • ar_hide_arview
    • ar_licence_renewal
    • ...

Smoke tests Passed 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 Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed: You can take inspiration from this readme.txt

ar-for-woocommerce/ar-woocommerce.php 92% from 13 tests

"AR For Woocommerce" version 5.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("ar-for-woocommerce.php" instead of "ar-woocommerce.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected13,687 lines of code in 30 files:
LanguageFilesBlank linesComment linesLines of code
JSON3007,845
PHP136315894,729
CSS49163822
JavaScript65860236
Sass33138
Markdown18017

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity5.50
▷ Minimum class complexity3.00
▷ Maximum class complexity8.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods1083.33%
▷ Protected methods216.67%
▷ Private methods00.00%
Functions76
▷ Named functions6484.21%
▷ Anonymous functions1215.79%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
19 PNG files occupy 0.27MB with 0.10MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/copy.png0.41KB0.43KB0.00%
assets/images/green-tick.png126.89KB12.42KB▼ 90.21%
assets/images/reset.png1.19KB1.33KB0.00%
assets/images/ar-pause-btn.png1.59KB0.82KB▼ 48.44%
assets/images/ar-play-btn.png1.67KB0.82KB▼ 51.17%