78% lana-widgets

Code Review | Lana Widgets

WordPress plugin Lana Widgets scored78%from 54 tests.

About plugin

  • Plugin page: lana-widgets
  • Plugin version: 1.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.6
  • WordPress version: 6.3.1
  • First release: Nov 23, 2016
  • Latest release: Dec 11, 2020
  • Number of updates: 62
  • Update frequency: every 23.8 days
  • Top authors: lanadesign (54.84%)lanacodes (46.77%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /6,268 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼2.81ms] Passed 4 tests

Server-side resources used by Lana Widgets
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0538.55 ▼4.65
Dashboard /wp-admin3.36 ▲0.0547.20 ▼3.63
Posts /wp-admin/edit.php3.41 ▲0.0550.41 ▲3.28
Add New Post /wp-admin/post-new.php5.94 ▲0.0582.47 ▼5.95
Media Library /wp-admin/upload.php3.28 ▲0.0536.99 ▲2.98

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Lana Widgets
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.24 ▼1.051.68 ▼0.7144.09 ▼1.86
Dashboard /wp-admin2,213 ▲255.91 ▲1.03101.64 ▼11.5138.77 ▼3.45
Posts /wp-admin/edit.php2,096 ▲72.06 ▲0.0439.05 ▲0.8235.59 ▲1.32
Add New Post /wp-admin/post-new.php1,552 ▲1918.51 ▼4.68584.03 ▼22.4264.21 ▲5.77
Media Library /wp-admin/upload.php1,392 ▲44.17 ▼0.0095.17 ▼2.3441.71 ▼3.19
Lana Widgets /wp-admin/lana-widgets-settings.php260.440.0615.94

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
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

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
Please fix the following
  • 20× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/lana-widgets/includes/v3/class-lana-title-widget.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/lana-widgets/includes/v4/class-lana-carousel-widget.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/lana-widgets/includes/v3/class-lana-jumbotron-widget.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/lana-widgets/includes/v3/class-lana-thumbnail-widget.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/lana-widgets/includes/v4/class-lana-panel-widget.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/lana-widgets/includes/v4/class-lana-jumbotron-widget.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/lana-widgets/includes/v4/class-lana-text-widget.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/lana-widgets/includes/v4/class-lana-alert-widget.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/lana-widgets/includes/v3/class-lana-well-widget.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/lana-widgets/includes/v3/class-lana-carousel-widget.php:6

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There are user-side issues you should fix
    • > GET request to /wp-admin/lana-widgets-settings.php
    • > Network (severe)
    wp-admin/lana-widgets-settings.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots lack descriptions #2, #3, #4, #5 in lana-widgets/assets to your readme.txt
The official readme.txt might help

lana-widgets/lana-widgets.php Passed 13 tests

The primary PHP file in "Lana Widgets" version 1.2.0 is used by WordPress to initiate all plugin functionality
33 characters long description:
Widgets with Bootstrap framework.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin30,183 lines of code in 44 files:
LanguageFilesBlank linesComment linesLines of code
CSS111,5295320,203
JavaScript132,0361,3057,106
PHP196921,0422,586
SVG100288

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity9.15
▷ Minimum class complexity1.00
▷ Maximum class complexity25.00
Average method complexity2.20
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes20
▷ Abstract classes00.00%
▷ Concrete classes20100.00%
▷ Final classes00.00%
Methods123
▷ Static methods00.00%
▷ Public methods123100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions16
▷ Named functions1062.50%
▷ Anonymous functions637.50%
Constants4
▷ Global constants4100.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 compressed PNG files occupy 0.03MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/plugin-header.png28.91KB29.86KB0.00%
assets/img/lana-image-placeholder.png1.52KB1.62KB0.00%