89% youcam-makeup

Code Review | YouCam Makeup For WooCommerce

WordPress plugin YouCam Makeup For WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: youcam-makeup
  • Plugin version: 1.0.2
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.1
  • WordPress version: 6.3.1
  • First release: Mar 23, 2023
  • Latest release: Jul 7, 2023
  • Number of updates: 10
  • Update frequency: every 10.6 days
  • Top authors: perfectcorp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /312 total downloads

Benchmarks

Plugin footprint 83% from 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼2.74ms] Passed 4 tests

This is a short check of server-side resources used by YouCam Makeup For WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0338.75 ▼1.21
Dashboard /wp-admin3.32 ▲0.0246.34 ▼3.43
Posts /wp-admin/edit.php3.37 ▲0.0248.90 ▲1.01
Add New Post /wp-admin/post-new.php5.90 ▲0.0294.07 ▼3.15
Media Library /wp-admin/upload.php3.25 ▲0.0233.16 ▼3.16

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 14 new files
Database: no new tables, 10 new options
New WordPress options
theysaidso_admin_options
ycm_version
widget_theysaidso_widget
ycm_api
ycm_settings
widget_recent-posts
db_upgraded
can_compress_scripts
widget_recent-comments
ycm_activate_on

Browser metrics Passed 4 tests

A check of browser resources used by YouCam Makeup For WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.48 ▼0.101.70 ▼0.0338.29 ▼8.44
Dashboard /wp-admin2,206 ▲185.86 ▼0.02105.44 ▼7.3236.23 ▼8.93
Posts /wp-admin/edit.php2,089 ▼01.96 ▼0.0939.52 ▲3.4135.77 ▼0.36
Add New Post /wp-admin/post-new.php1,514 ▼1417.85 ▼0.75611.10 ▼23.2964.43 ▲11.81
Media Library /wp-admin/upload.php1,385 ▼34.21 ▼0.0097.22 ▼4.9441.22 ▼2.23

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 8 options
    • widget_theysaidso_widget
    • ycm_version
    • db_upgraded
    • widget_recent-comments
    • ycm_activate_on
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts

Smoke tests Passed 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)
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
2 plugin tags: virtual mirror, virtual try-on

youcam-makeup/youcam-makeup.php 85% from 13 tests

"YouCam Makeup For WooCommerce" version 1.0.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Requires at least: Required version must match the one declared in readme.txt ("5.9" instead of "4.0")
  • Domain Path: The domain path points to a folder that does not exist ("/lang")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin766 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP108716752
JavaScript1008
CSS1006

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity7.60
▷ Minimum class complexity2.00
▷ Maximum class complexity15.00
Average method complexity1.93
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods31
▷ Static methods26.45%
▷ Public methods2064.52%
▷ Protected methods00.00%
▷ Private methods1135.48%
Functions10
▷ Named functions00.00%
▷ Anonymous functions10100.00%
Constants7
▷ Global constants7100.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.28MB with 0.18MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
includes/images/category_tip.png283.12KB95.78KB▼ 66.17%