84% vivet-widget

Code Review | Vivet Widget

WordPress plugin Vivet Widget scored84%from 54 tests.

About plugin

  • Plugin page: vivet-widget
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.4-5.8
  • WordPress version: 6.3.1
  • First release: Aug 12, 2021
  • Latest release: Nov 30, 2021
  • Number of updates: 9
  • Update frequency: every 12.5 days
  • Top authors: leonelvivet (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /275 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼3.66ms] Passed 4 tests

This is a short check of server-side resources used by Vivet Widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0234.48 ▼1.78
Dashboard /wp-admin3.32 ▼0.0245.28 ▼15.24
Posts /wp-admin/edit.php3.38 ▲0.0244.36 ▲1.27
Add New Post /wp-admin/post-new.php5.91 ▲0.0284.00 ▲1.11
Media Library /wp-admin/upload.php3.25 ▲0.0235.10 ▲2.08

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 8 new files
Database: 1 new table, 6 new options
New tables
wp_vivet_app_widget
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
widget_recent-comments
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Vivet Widget
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,837 ▲9114.26 ▼0.092.24 ▲0.7338.63 ▼2.29
Dashboard /wp-admin2,212 ▲315.53 ▼0.1085.18 ▼17.9174.48 ▲31.83
Posts /wp-admin/edit.php2,129 ▲291.96 ▼0.0136.28 ▲1.4038.73 ▲3.38
Add New Post /wp-admin/post-new.php1,399 ▼13221.57 ▼1.53582.85 ▼42.85174.97 ▲115.88
Media Library /wp-admin/upload.php1,429 ▲264.25 ▲0.1297.95 ▼5.5645.27 ▲2.09

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means 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
Almost there! Just fix the following items
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/vivet-widget/admin/admin_landing.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/vivet-widget/vivet_app_widget.php:18
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/vivet-widget/admin/admin_landing.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: widget, vivetapp, vivet, landing

vivet-widget/vivet_app_widget.php 92% from 13 tests

"Vivet Widget" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("vivet-widget.php" instead of "vivet_app_widget.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin109 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP3209106
CSS1003

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.07
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods6100.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.05MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/img/logo_plugin_wp.png46.43KB11.69KB▼ 74.83%
public/img/icon.png0.47KB0.46KB▼ 1.25%