74% size-guarantee

Code Review | Size Guarantee

WordPress plugin Size Guarantee scored 74% from 54 tests.

About plugin

  • Plugin page: size-guarantee
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9+
  • WordPress version: 5.8.1
  • First release: Apr 15, 2021
  • Latest release: Apr 20, 2021
  • Number of updates: 4
  • Update frequency: every 3.8 days
  • Top authors: sizeguarantee (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 123 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.12MB] [CPU: ▼141.70ms] Passed 4 tests

An overview of server-side resources used by Size Guarantee
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.95 ▲0.1247.42 ▲10.83
Dashboard /wp-admin3.18 ▲0.1350.42 ▲0.91
Posts /wp-admin/edit.php3.29 ▲0.1841.13 ▼11.33
Add New Post /wp-admin/post-new.php5.54 ▲0.1097.66 ▼564.98
Media Library /wp-admin/upload.php3.12 ▲0.1238.94 ▲8.61

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: 26 new files
Database: no new tables, 3 new options
New WordPress options
size-guarantee-connect
size_guarantee_style
size_guarantee_store_id

Browser metrics Passed 4 tests

Checking browser requirements for Size Guarantee
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,879 ▲28316.30 ▲0.4712.47 ▲3.3951.72 ▲4.01
Dashboard /wp-admin3,012 ▲816.03 ▲0.08147.26 ▼2.42110.76 ▼9.77
Posts /wp-admin/edit.php2,808 ▲692.70 ▲0.0174.44 ▲4.4799.60 ▼0.97
Add New Post /wp-admin/post-new.php1,532 ▼15116.36 ▼2.37289.94 ▼90.71118.98 ▲5.04
Media Library /wp-admin/upload.php1,875 ▲685.03 ▲0.03159.33 ▲7.99111.18 ▼14.39

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/size-guarantee/uninstall.php+35
    Constant size_guarantee_prefix already defined
  • Zombie WordPress options detected upon uninstall: 3 options
    • size-guarantee-connect
    • size_guarantee_store_id
    • size_guarantee_style

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/size-guarantee/public/partials/size-guarantee-public-display.php
    • > /wp-content/plugins/size-guarantee/admin/partials/size-guarantee-admin-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
6 plugin tags: dress suggestions, ecommerce, mesurement, check size, dress size...

size-guarantee/size-guarantee.php Passed 13 tests

The primary PHP file in "Size Guarantee" version 1.0.0 is used by WordPress to initiate all plugin functionality
96 characters long description:
This is a short description of what the plugin does. It's displayed in the WordPress admin area.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected748 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12281674588
JavaScript2116084
CSS210876

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity5.57
▷ Minimum class complexity1.00
▷ Maximum class complexity30.00
Average method complexity1.84
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods38
▷ Static methods25.26%
▷ Public methods3386.84%
▷ Protected methods00.00%
▷ Private methods513.16%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
4 PNG files occupy 0.28MB with 0.19MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png75.67KB24.35KB▼ 67.82%
assets/screenshot-2.png91.80KB29.45KB▼ 67.92%
media/size_guarantee_logo.png30.69KB11.52KB▼ 62.46%
assets/screenshot-3.png92.87KB30.06KB▼ 67.63%