84% lbdesign-button-shortcode

Code Review | LBDesign Button Shortcode

WordPress plugin LBDesign Button Shortcode scored84%from 54 tests.

About plugin

  • Plugin page: lbdesign-button-s...
  • Plugin version: 1.3.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.2.3
  • WordPress version: 6.3.1
  • First release: Nov 16, 2015
  • Latest release: Oct 2, 2019
  • Number of updates: 32
  • Update frequency: every 44.3 days
  • Top authors: lepittenger (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /2,449 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.01MB] [CPU: ▼5.64ms] Passed 4 tests

Analyzing server-side resources used by LBDesign Button Shortcode
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.51 ▼2.70
Dashboard /wp-admin3.32 ▲0.0244.93 ▼8.81
Posts /wp-admin/edit.php3.37 ▲0.0144.47 ▼3.53
Add New Post /wp-admin/post-new.php5.90 ▲0.0287.93 ▼7.50
Media Library /wp-admin/upload.php3.24 ▲0.0135.52 ▲2.66

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for LBDesign Button Shortcode
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲8813.24 ▼1.141.87 ▼0.1139.35 ▼4.85
Dashboard /wp-admin2,216 ▲284.87 ▼1.20107.21 ▼9.4143.09 ▼3.29
Posts /wp-admin/edit.php2,093 ▲12.05 ▲0.0039.08 ▲4.3334.82 ▲0.78
Add New Post /wp-admin/post-new.php1,547 ▲1623.38 ▲0.23624.04 ▼30.3953.11 ▼17.48
Media Library /wp-admin/upload.php1,392 ▲44.26 ▼0.0197.09 ▼3.9841.21 ▼4.86

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts

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 fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/lbdesign-button-shortcode/lbdesign-button-shortcode.php:47

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration Passed 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
8 plugin tags: button shortcode, wordpress button plugin, shortcode, buttons, button...

lbdesign-button-shortcode/lbdesign-button-shortcode.php Passed 13 tests

The main PHP file in "LBDesign Button Shortcode" ver. 1.3.2 adds more information about the plugin and also serves as the entry point for this plugin
25 characters long description:
A simple button shortcode

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 plugin183 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript142770
PHP1251560
CSS114553

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.67
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/icon-grey.png0.63KB0.34KB▼ 45.50%