89% loomisoft-button-widget

Code Review | Button Widget by Loomisoft

WordPress plugin Button Widget by Loomisoftscored 89% from 54 tests.

About plugin

  • Plugin page: loomisoft-button-...
  • Plugin version: 1.2.1
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9
  • WordPress version: 5.9.2
  • First release: Nov 16, 2016
  • Latest release: Nov 21, 2017
  • Number of updates: 13
  • Update frequency: every 28.5 days
  • Top authors: loomisoft (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

1,000+ active / 11,416 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.04MB] [CPU: ▼293.79ms] Passed 4 tests

Server-side resources used by Button Widget by Loomisoft
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.75 ▲0.2459.54 ▲2.86
Dashboard /wp-admin3.49 ▲0.0846.31 ▲8.75
Posts /wp-admin/edit.php3.71 ▲0.0747.05 ▲6.16
Add New Post /wp-admin/post-new.php6.94 ▼0.03104.70 ▼1,182.64
Media Library /wp-admin/upload.php3.35 ▲0.0529.55 ▼1.55

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 12 new files
Database: no new tables, 2 new options
New WordPress options
ls_bw_option
widget_ls_button_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Button Widget by Loomisoft
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,854 ▲10016.01 ▲0.365.64 ▼0.122.25 ▼0.21
Dashboard /wp-admin2,976 ▲1186.88 ▲0.72115.66 ▼14.25214.60 ▲57.12
Posts /wp-admin/edit.php2,778 ▲843.66 ▲0.3067.44 ▲5.09187.44 ▲46.99
Add New Post /wp-admin/post-new.php1,732 ▲3618.69 ▼3.12400.79 ▼59.99186.92 ▲20.57
Media Library /wp-admin/upload.php1,779 ▲845.91 ▲0.39128.32 ▼15.13246.17 ▲56.02

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
These items require your attention
  • Zombie WordPress options were found after uninstall: 2 options
    • widget_ls_button_widget
    • ls_bw_option

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% 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 your attention:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === Button Widget by Loomisoft=== )
You can look at the official readme.txt

loomisoft-button-widget/loomisoft-button-widget.php 92% from 13 tests

The entry point to "Button Widget by Loomisoft" version 1.2.1 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Description: The description should be shorter than 140 characters (currently 428 characters long)

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
Success! There were no dangerous files found in this plugin4,390 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP5120624,121
CSS2398213
JavaScript18856

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity50.50
▷ Minimum class complexity45.00
▷ Maximum class complexity56.00
Average method complexity5.12
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods24
▷ Static methods1979.17%
▷ Public methods24100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.08MB with 0.08MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/ls-wp-menu-icon.png19.81KB0.46KB▼ 97.67%
images/ls-wp-admin-branding.png65.37KB2.53KB▼ 96.13%