89% rooom-3d-product-viewer

Code Review | rooom 3D Product Viewer

WordPress plugin rooom 3D Product Viewer scored89%from 54 tests.

About plugin

  • Plugin page: rooom-3d-product-...
  • Plugin version: 1.1.2
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.1
  • WordPress version: 6.3.1
  • First release: Feb 8, 2022
  • Latest release: Feb 9, 2023
  • Number of updates: 16
  • Update frequency: every 23.3 days
  • Top authors: rooomcom (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /3,127 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: ▲0.34MB] [CPU: ▼5.48ms] Passed 4 tests

This is a short check of server-side resources used by rooom 3D Product Viewer
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.73 ▲0.2744.05 ▼0.97
Dashboard /wp-admin3.67 ▲0.3651.04 ▼4.78
Posts /wp-admin/edit.php3.78 ▲0.4247.33 ▼1.97
Add New Post /wp-admin/post-new.php6.27 ▲0.3887.69 ▼14.21
Media Library /wp-admin/upload.php3.59 ▲0.3640.75 ▲3.89
3D Product Viewer /wp-admin/themes.php?page=rooom-viewer3.5736.95

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 21 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by rooom 3D Product Viewer
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲3014.41 ▲0.062.27 ▲0.2846.29 ▲3.77
Dashboard /wp-admin2,215 ▲385.74 ▲0.1387.58 ▼5.1942.85 ▲3.28
Posts /wp-admin/edit.php2,128 ▲282.30 ▲0.3238.69 ▼0.5833.75 ▼2.41
Add New Post /wp-admin/post-new.php1,543 ▲1522.20 ▼0.94667.55 ▼26.6239.95 ▼12.96
Media Library /wp-admin/upload.php1,423 ▲264.53 ▲0.35109.12 ▲3.5046.02 ▼4.01
3D Product Viewer /wp-admin/themes.php?page=rooom-viewer9151.9126.1027.87

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed:
  • Screenshots: Add an image for screenshot #1 (Global settings for all product viewers in the shop)
  • Tags: There are too many tags (12 tag instead of maximum 10)
Please take inspiration from this readme.txt

rooom-3d-product-viewer/rooom-woocommerce-plugin.php 92% from 13 tests

The primary PHP file in "rooom 3D Product Viewer" version 1.1.2 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("rooom-3d-product-viewer.php" instead of "rooom-woocommerce-plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin1,982 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP82894841,450
PO File2170194457
JavaScript323266
CSS1019

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity22.00
▷ Minimum class complexity22.00
▷ Maximum class complexity22.00
Average method complexity1.88
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods25
▷ Static methods520.00%
▷ Public methods2288.00%
▷ Protected methods14.00%
▷ Private methods28.00%
Functions30
▷ Named functions2996.67%
▷ Anonymous functions13.33%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
3 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/pixel.png1.05KB0.10KB▼ 90.24%
assets/rooom-icon-3D-scan.png20.67KB9.98KB▼ 51.71%
assets/rooom_logo.png11.87KB3.24KB▼ 72.71%