88% s2-wishlist-for-woocommerce

Code Review | S2 Wishlist for WooCommerce

WordPress plugin S2 Wishlist for WooCommerce scored 88% from 54 tests.

About plugin

  • Plugin page: s2-wishlist-for-w...
  • Plugin version: 2.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7.0-5.8.1
  • WordPress version: 6.3.1
  • First release: Dec 26, 2020
  • Latest release: Jul 29, 2023
  • Number of updates: 26
  • Update frequency: every 36.4 days
  • Top authors: shubanstudio (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 550 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.01MB] [CPU: ▼3.34ms] Passed 4 tests

An overview of server-side resources used by S2 Wishlist for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0142.39 ▲0.87
Dashboard /wp-admin3.32 ▲0.0146.93 ▼5.61
Posts /wp-admin/edit.php3.37 ▲0.0145.17 ▼1.92
Add New Post /wp-admin/post-new.php5.90 ▲0.0196.14 ▼4.35
Media Library /wp-admin/upload.php3.24 ▲0.0135.54 ▼1.49

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for S2 Wishlist for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲9613.32 ▼1.272.02 ▼0.2243.74 ▲3.27
Dashboard /wp-admin2,212 ▲245.80 ▼0.10102.06 ▼12.8940.51 ▼1.27
Posts /wp-admin/edit.php2,095 ▲32.01 ▲0.0235.35 ▼5.6337.15 ▼1.35
Add New Post /wp-admin/post-new.php1,548 ▲3418.43 ▲0.93643.50 ▼33.1589.05 ▲24.18
Media Library /wp-admin/upload.php1,394 ▲34.33 ▲0.1399.26 ▼6.8641.90 ▼3.86

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, 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
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 just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 79% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention: Please take inspiration from this readme.txt

s2-wishlist-for-woocommerce/init.php 69% from 13 tests

The main file in "S2 Wishlist for WooCommerce" v. 2.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 166 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("s2-wishlist-for-woocommerce.php" instead of "init.php")
  • Requires at least: Required version must be the same as the one declared in readme.txt ("5.3" instead of "4.7.0")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin3,671 lines of code in 32 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript4909632,298
PHP224426341,108
CSS43915247
SVG20218

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity9.62
▷ Minimum class complexity2.00
▷ Maximum class complexity23.00
Average method complexity2.47
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods47
▷ Static methods817.02%
▷ Public methods4697.87%
▷ Protected methods00.00%
▷ Private methods12.13%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants9100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/wishlist.png0.88KB0.44KB▼ 50.33%
assets/images/selected-wishlist.png0.75KB0.42KB▼ 44.52%