84% marmoset-viewer

Code Review | Marmoset Viewer

WordPress plugin Marmoset Viewer scored 84% from 54 tests.

About plugin

  • Plugin page: marmoset-viewer
  • Plugin version: 1.9.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.0-5.7.2
  • WordPress version: 6.3.1
  • First release: Jul 7, 2016
  • Latest release: Jun 30, 2021
  • Number of updates: 49
  • Update frequency: every 37.1 days
  • Top authors: revoxis (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

500+ active / 9,423 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼3.97ms] Passed 4 tests

Server-side resources used by Marmoset Viewer
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0339.49 ▼3.89
Dashboard /wp-admin3.34 ▲0.0450.56 ▲2.16
Posts /wp-admin/edit.php3.39 ▲0.0446.80 ▼1.93
Add New Post /wp-admin/post-new.php5.94 ▲0.0686.60 ▼12.23
Media Library /wp-admin/upload.php3.26 ▲0.0440.98 ▲5.26

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Marmoset Viewer
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,850 ▲11513.25 ▼1.044.89 ▲3.3043.63 ▼2.80
Dashboard /wp-admin2,236 ▲544.91 ▼0.9797.37 ▼8.0366.67 ▲22.53
Posts /wp-admin/edit.php2,123 ▲311.99 ▼0.0638.24 ▼0.5535.30 ▲4.62
Add New Post /wp-admin/post-new.php1,698 ▲17921.90 ▼1.19774.53 ▲110.8759.34 ▼6.24
Media Library /wp-admin/upload.php1,412 ▲304.27 ▼0.09109.30 ▲10.2275.38 ▲30.97

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/marmoset-viewer/mviewer.php

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

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes: The official readme.txt is a good inspiration

marmoset-viewer/marmoset-viewer.php Passed 13 tests

The main PHP file in "Marmoset Viewer" ver. 1.9.3 adds more information about the plugin and also serves as the entry point for this plugin
127 characters long description:
Allows you to embed Marmoset Toolbag 2 aswell as Toolbag 3 mview files, allowing people to view your models in all their glory.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected801 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP23134321
CSS270234
SVG202122
HTML19077
JavaScript2191147

PHP code Passed 2 tests

This is a very shot review of 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.35
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
1 PNG file occupies 0.13MB with 0.08MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/revolutionart_logo.png133.84KB50.82KB▼ 62.03%