83% vendora-gr-widget-shortcode

Code Review | Vendora Widget

WordPress plugin Vendora Widget scored 83% from 54 tests.

About plugin

  • Plugin page: vendora-gr-widget...
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.1.1
  • WordPress version: 5.8.1
  • First release: Apr 18, 2019
  • Latest release: Jun 4, 2019
  • Number of updates: 8
  • Update frequency: every 6.0 days
  • Top authors: vendora (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 583 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼147.43ms] Passed 4 tests

This is a short check of server-side resources used by Vendora Widget
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.87 ▲0.1535.44 ▲13.03
Dashboard /wp-admin3.09 ▲0.0347.22 ▲3.11
Posts /wp-admin/edit.php3.14 ▲0.0241.92 ▼19.93
Add New Post /wp-admin/post-new.php5.45 ▲0.0184.59 ▼572.40
Media Library /wp-admin/upload.php3.03 ▲0.0332.21 ▼0.51

Server storage [IO: ▲1.79MB] [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, 1 new option
New WordPress options
widget_vendora_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Vendora Widget
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲4216.34 ▲0.826.93 ▼3.0947.81 ▲0.34
Dashboard /wp-admin2,973 ▲425.89 ▼0.15133.74 ▼10.57108.55 ▼4.33
Posts /wp-admin/edit.php2,739 ▲32.69 ▼0.0161.58 ▼6.6686.61 ▼0.79
Add New Post /wp-admin/post-new.php1,672 ▲17218.76 ▲0.11366.87 ▼20.60114.73 ▼0.95
Media Library /wp-admin/upload.php1,807 ▼05.01 ▼0.01146.24 ▲0.16120.50 ▲4.43

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 1 option
    • widget_vendora_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 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
Please fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/vendora-gr-widget-shortcode/vendora-widget.php:12

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention: The official readme.txt is a good inspiration

vendora-gr-widget-shortcode/vendora-widget.php 92% from 13 tests

"Vendora Widget" version 1.0.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("vendora-gr-widget-shortcode.php" instead of "vendora-widget.php")

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
Everything looks great! No dangerous files found in this plugin118 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13411118

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.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

Using a strong compression for your PNG files is a great way to speed-up your plugin
6 PNG files occupy 1.79MB with 1.22MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/banner-772x250.png100.15KB33.13KB▼ 66.92%
assets/icon-128x128.png8.48KB1.72KB▼ 79.70%
assets/screenshot-2.png575.04KB225.90KB▼ 60.72%
assets/icon-256x256.png12.30KB3.10KB▼ 74.82%
assets/screenshot-1.png866.81KB356.41KB▼ 58.88%