10% ls-snacktools

Code Review | LS Snacktools

WordPress plugin LS Snacktools scored10%from 54 tests.

About plugin

  • Plugin page: ls-snacktools
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: WordPress 4.0-4.9.4
  • WordPress version: 6.3.1
  • First release: Jul 23, 2015
  • Latest release: Mar 19, 2018
  • Number of updates: 8
  • Update frequency: every 121.4 days
  • Top authors: lenasterg (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /848 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
These installer errors require your attention
  • Install procedure had errors
    • > Compile error in wp-content/plugins/ls-snacktools/snacktools.php+84
    Cannot use $this as parameter

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

A check of server-side resources used by LS Snacktools
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0042.20 ▼0.73
Dashboard /wp-admin3.31 ▲0.0058.43 ▲5.83
Posts /wp-admin/edit.php3.36 ▲0.0051.87 ▼2.71
Add New Post /wp-admin/post-new.php5.89 ▲0.0090.39 ▼8.66
Media Library /wp-admin/upload.php3.23 ▲0.0040.98 ▼0.40

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for LS Snacktools
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.21 ▼1.351.79 ▼0.1842.93 ▲2.76
Dashboard /wp-admin2,206 ▲184.86 ▼0.25114.90 ▲4.1842.64 ▲3.23
Posts /wp-admin/edit.php2,086 ▼62.00 ▲0.0037.60 ▼2.9531.70 ▼4.58
Add New Post /wp-admin/post-new.php1,520 ▼223.06 ▼0.10667.88 ▼24.8653.09 ▼6.75
Media Library /wp-admin/upload.php1,391 ▲34.21 ▲0.0595.32 ▼22.0844.06 ▼4.82

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Cannot use $this as parameter in wp-content/plugins/ls-snacktools/snacktools.php on line 84

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)
There were no browser issues found

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% 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
Please fix the following attributes:
  • Donate link: Please fix this invalid URI: ""
  • Screenshots: Please add images for these screenshots: #1 (Paste of a simple url in post), #2 (The resulted embed slide from slidesnack.com into the post.)
You can take inspiration from this readme.txt

ls-snacktools/snacktools.php 77% from 13 tests

Analyzing the main PHP file in "LS Snacktools" version 1.2
Please make the necessary changes and fix the following:
  • Text Domain: Please use dashes and lowercase characters for text domains
  • Requires at least: Periods and digits should be used for the required version number (ex. "7.0" instead of "WordPress 4.0")
  • Main file name: The principal plugin file should be the same as the plugin slug ("ls-snacktools.php" instead of "snacktools.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin103 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP1172461
PO File261042

PHP code Passed 2 tests

An short overview of 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.31
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.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 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.50MB with 0.31MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png42.10KB17.86KB▼ 57.58%
screenshot-2.png469.90KB166.86KB▼ 64.49%