93% shop-by-look

Code Review | Shop by Look

WordPress plugin Shop by Look scored 93% from 54 tests.

About plugin

  • Plugin page: shop-by-look
  • Plugin version: 1.0-BETA
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-4.4.2
  • WordPress version: 5.8.1
  • First release: Mar 19, 2016
  • Latest release: Apr 1, 2016
  • Number of updates: 4
  • Update frequency: every 3.5 days
  • Top authors: s7design (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,441 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

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

Server-side resources used by Shop by Look
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.0134.55 ▼2.34
Dashboard /wp-admin3.06 ▲0.0153.05 ▲9.43
Posts /wp-admin/edit.php3.12 ▲0.0143.12 ▲3.09
Add New Post /wp-admin/post-new.php5.42 ▼0.0190.14 ▼566.28
Media Library /wp-admin/upload.php3.01 ▲0.0033.66 ▲2.99
Add New /wp-admin/post-new.php?post_type=shop_by_look2.8222.35
All Items /wp-admin/edit.php?post_type=shop_by_look2.8222.88

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 21 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Shop by Look: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲10715.80 ▲0.1811.73 ▲2.0250.17 ▲2.76
Dashboard /wp-admin2,970 ▲365.92 ▼0.08158.03 ▲5.27113.87 ▲7.93
Posts /wp-admin/edit.php2,739 ▼02.72 ▲0.0169.20 ▲2.7181.31 ▼12.49
Add New Post /wp-admin/post-new.php1,500 ▼18318.61 ▲0.14395.01 ▼23.51109.54 ▲6.95
Media Library /wp-admin/upload.php1,807 ▼05.04 ▲0.00175.60 ▲20.87116.76 ▼1.44
Add New /wp-admin/post-new.php?post_type=shop_by_look280.900.1611.38
All Items /wp-admin/edit.php?post_type=shop_by_look280.900.8810.66

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The SRP test was a success

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
These are user-side errors you should fix
    • > GET request to /wp-admin/post-new.php?post_type=shop_by_look
    • > Network (severe)
    wp-admin/post-new.php?post_type=shop_by_look - Failed to load resource: the server responded with a status of 500 (Internal Server Error)
    • > GET request to /wp-admin/edit.php?post_type=shop_by_look
    • > Network (severe)
    wp-admin/edit.php?post_type=shop_by_look - Failed to load resource: the server responded with a status of 500 (Internal Server Error)

Optimizations

Plugin configuration 87% 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:
  • Donate link: Invalid url: ""
  • Screenshots: Add images for these screenshots: #1 (/assets/screenshot-1.png), #2 (/assets/screenshot-2.png)
You can look at the official readme.txt

shop-by-look/shop-by-look.php 85% from 13 tests

This is the main PHP file of "Shop by Look" version 1.0-BETA, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Description: The description should be shorter than 140 characters (currently 229 characters long)
  • Version: The version number should only use digits and periods (ex. "1.0.3" instead of "1.0-BETA")

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
Success! There were no dangerous files found in this plugin326 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP754158279
PO File1131442
JavaScript2003
CSS2002

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity2.12
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 0% from 2 tests

Image compression 0% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
4 PNG files occupy 1.61MB with 0.70MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
(invalid) assets/screenshot-2.png1,457.54KB0.00KB▼ 100.00%
assets/screenshot-1.png192.53KB64.14KB▼ 66.68%
assets/images/select2x2.png0.83KB0.77KB▼ 6.15%
assets/images/select2.png0.60KB0.99KB0.00%