93% 360-product-view

Code Review | 360 Product Detait View

WordPress plugin 360 Product Detait View scored 93% from 54 tests.

About plugin

  • Plugin page: 360-product-view
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4
  • WordPress version: 5.9.2
  • First release: Mar 18, 2017
  • Latest release: Mar 18, 2017
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: Minh Tuan Nguyen (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 964 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▼0.00MB] [CPU: ▼309.00ms] Passed 4 tests

A check of server-side resources used by 360 Product Detait View
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0257.52 ▲6.64
Dashboard /wp-admin3.43 ▲0.0232.36 ▼2.86
Posts /wp-admin/edit.php3.65 ▲0.0235.86 ▼1.41
Add New Post /wp-admin/post-new.php6.91 ▼0.06102.29 ▼1,228.02
Media Library /wp-admin/upload.php3.31 ▲0.0125.15 ▼3.69

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 32 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for 360 Product Detait View
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,898 ▲14416.25 ▲0.579.68 ▲3.482.00 ▼0.51
Dashboard /wp-admin2,896 ▲386.13 ▼0.07116.04 ▼15.66155.34 ▼4.83
Posts /wp-admin/edit.php2,692 ▼23.23 ▼0.0163.87 ▼2.58140.25 ▼2.33
Add New Post /wp-admin/post-new.php1,764 ▲10317.70 ▲1.62399.20 ▲3.22156.87 ▲7.05
Media Library /wp-admin/upload.php1,700 ▲55.54 ▲0.01141.03 ▼3.65186.39 ▼4.91

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Uninstall script ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

SRP 50% from 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
Please fix the following
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/360-product-view/public/partials/yup-360-product-public-display.php
    • > /wp-content/plugins/360-product-view/admin/partials/yup-360-product-admin-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (360 Product Configuration), #2 (360 Product Gallery Default)
The official readme.txt might help

360-product-view/yup-360-product.php 85% from 13 tests

The entry point to "360 Product Detait View" version 1.0.0 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("360-product-view.php" instead of "yup-360-product.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

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
No dangerous file extensions were detected485 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP13177566369
CSS253292
JavaScript394924

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity5.29
▷ Minimum class complexity1.00
▷ Maximum class complexity24.00
Average method complexity2.07
▷ Minimum method complexity1.00
▷ Maximum method complexity14.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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
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
7 PNG files occupy 0.24MB with 0.16MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/images/browser_logos-64.png33.64KB9.18KB▼ 72.73%
public/images/fs.png3.66KB0.74KB▼ 79.86%
public/images/360.png7.61KB3.06KB▼ 59.79%
public/images/sprites.png3.24KB2.33KB▼ 28.22%
public/images/360_icon.png63.09KB0.85KB▼ 98.66%