93% lasso

Code Review | Lasso Shortcode

WordPress plugin Lasso Shortcode scored 93% from 54 tests.

About plugin

  • Plugin page: lasso
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.6.1
  • WordPress version: 5.8.1
  • First release: Oct 27, 2016
  • Latest release: Oct 28, 2016
  • Number of updates: 7
  • Update frequency: every 48.0 days
  • Top authors: elsbree (100%)

Code review

54 tests

User reviews

1 review

Install metrics

1,000+ active / 3,757 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

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

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

An overview of server-side resources used by Lasso Shortcode
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1233.80 ▲14.22
Dashboard /wp-admin3.06 ▲0.0140.26 ▼8.95
Posts /wp-admin/edit.php3.12 ▲0.0147.23 ▼2.58
Add New Post /wp-admin/post-new.php5.42 ▼0.0191.04 ▼567.37
Media Library /wp-admin/upload.php3.01 ▲0.0133.89 ▼1.86

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 7 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Lasso Shortcode
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲8316.33 ▲0.927.67 ▼4.2049.55 ▼4.10
Dashboard /wp-admin2,973 ▲426.02 ▼0.06144.19 ▲0.40118.18 ▼3.36
Posts /wp-admin/edit.php2,739 ▼02.68 ▼0.0166.12 ▼8.3692.19 ▼3.24
Add New Post /wp-admin/post-new.php1,683 ▼018.23 ▼0.54388.75 ▼0.91112.83 ▼7.12
Media Library /wp-admin/upload.php1,807 ▼05.00 ▼0.02167.35 ▲10.13123.95 ▲3.27

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled successfully, without leaving any zombie files or tables

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 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/lasso/lasso-shortcode.php:12

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 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (Mobile and web views of a Lasso coupon code unlock.), #2 (This is an example signup form.), #3 (This is a contest example.)
You can take inspiration from this readme.txt

lasso/lasso-shortcode.php 92% from 13 tests

"Lasso Shortcode" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("lasso.php" instead of "lasso-shortcode.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin49 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1112133
Markdown15016

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.23
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%
Functions3
▷ Named functions3100.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

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 1.67MB with 1.15MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png1,709.51KB529.11KB▼ 69.05%