89% snappic

Code Review | Snappic for WooCommerce

WordPress plugin Snappic for WooCommerce scored 89% from 54 tests.

About plugin

  • Plugin page: snappic
  • Plugin version: 1.3.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.0
  • WordPress version: 6.3.1
  • First release: Aug 18, 2017
  • Latest release: Aug 4, 2020
  • Number of updates: 26
  • Update frequency: every 41.6 days
  • Top authors: snappic (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,655 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
Install script ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼1.94ms] Passed 4 tests

Server-side resources used by Snappic for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0441.49 ▲0.19
Dashboard /wp-admin3.35 ▲0.0447.91 ▲1.13
Posts /wp-admin/edit.php3.46 ▲0.1045.72 ▲1.51
Add New Post /wp-admin/post-new.php5.93 ▲0.0485.92 ▼10.59
Media Library /wp-admin/upload.php3.27 ▲0.0436.28 ▲1.75

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 43 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Snappic for WooCommerce: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.15 ▼1.224.73 ▲2.9544.88 ▲4.39
Dashboard /wp-admin2,210 ▲194.88 ▲0.01106.95 ▲4.4245.45 ▲3.28
Posts /wp-admin/edit.php2,092 ▼02.06 ▲0.0133.59 ▼3.8132.29 ▲2.47
Add New Post /wp-admin/post-new.php1,537 ▲423.32 ▲0.06625.14 ▲5.1459.77 ▲6.88
Media Library /wp-admin/upload.php1,389 ▲44.21 ▼0.0398.35 ▼18.8549.96 ▼0.55

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
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

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
Everything seems fine, however this is by no means 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Tags: Please delete some tags, you are using 13 tag instead of maximum 10
The official readme.txt might help

snappic/snappic-for-woocommerce.php 85% from 13 tests

"Snappic for WooCommerce" version 1.3.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("snappic.php" instead of "snappic-for-woocommerce.php")

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
There were no executable files found in this plugin1,437 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP9272434816
CSS12013391
SVG50594
Bourne Shell28059
JavaScript2289547
JSON10028
Markdown1102

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity10.75
▷ Minimum class complexity1.00
▷ Maximum class complexity37.00
Average method complexity2.03
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods76
▷ Static methods1722.37%
▷ Public methods7092.11%
▷ Protected methods00.00%
▷ Private methods67.89%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants00.00%
▷ Class constants8100.00%
▷ Public constants8100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin