99% optimized-product-photos

Code Review | Retail ready photos by Pixc

WordPress plugin Retail ready photos by Pixc scored 99% from 53 tests.

About plugin

  • Plugin page: optimized-product...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.8.1
  • WordPress version: 5.8.1
  • First release: Nov 18, 2015
  • Latest release: Mar 22, 2016
  • Number of updates: 5
  • Update frequency: every 125.2 days
  • Top authors: pixc (100%)

Code review

53 tests

User reviews

1 review

Install metrics

10+ active / 770 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

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

Server-side resources used by Retail ready photos by Pixc
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.83 ▲0.1226.82 ▲5.13
Dashboard /wp-admin3.06 ▲0.0042.00 ▲0.05
Posts /wp-admin/edit.php3.11 ▲0.0033.68 ▼8.56
Add New Post /wp-admin/post-new.php5.41 ▼0.0181.97 ▼3,964.50
Media Library /wp-admin/upload.php3.00 ▲0.0031.30 ▲2.15

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 9 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Retail ready photos by Pixc
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,667 ▲6115.81 ▲0.309.98 ▲0.9446.41 ▼3.86
Dashboard /wp-admin2,915 ▲625.96 ▲0.10134.89 ▼5.25105.53 ▲9.93
Posts /wp-admin/edit.php2,703 ▼32.69 ▲0.0061.68 ▼8.0995.77 ▲2.56
Add New Post /wp-admin/post-new.php1,853 ▼18518.93 ▼0.41350.86 ▼1.76106.95 ▲3.16
Media Library /wp-admin/upload.php1,775 ▲35.02 ▲0.04144.29 ▼5.96117.90 ▲15.81

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
This plugin's uninstaller ran successfully

Smoke tests Passed 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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
No output text or server-side errors detected on direct access of PHP files

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 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots do not have images: #1 (Main app dashboard), #2 (Submitting order), #3 (Completed order review)
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === optimized-product-photos === )
You can take inspiration from this readme.txt

optimized-product-photos/optimized-product-photos.php 92% from 13 tests

The main PHP file in "Retail ready photos by Pixc" ver. 1.2 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin283 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP26412251
JavaScript12019
CSS12013

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.39
Average class complexity38.00
▷ Minimum class complexity38.00
▷ Maximum class complexity38.00
Average method complexity3.19
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods18
▷ Static methods1794.44%
▷ Public methods18100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.00%

Plugin size Passed 1 test

Image compression Passed 1 test

PNG files should be compressed to save space and minimize bandwidth usage
4 PNG files occupy 0.28MB with 0.17MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png93.34KB36.12KB▼ 61.30%
assets/icon-256x256.png8.17KB3.71KB▼ 54.57%
screenshot-3.png150.98KB55.96KB▼ 62.94%
screenshot-1.png36.26KB14.76KB▼ 59.29%