84% virtual-queue

Code Review | Virtual Queue

WordPress plugin Virtual Queue scored84%from 54 tests.

About plugin

  • Plugin page: virtual-queue
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-5.3
  • WordPress version: 6.3.1
  • First release: Apr 7, 2020
  • Latest release: Aug 6, 2020
  • Number of updates: 15
  • Update frequency: every 8.1 days
  • Top authors: alxuta (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /958 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.12MB] [CPU: ▼15.92ms] Passed 4 tests

Analyzing server-side resources used by Virtual Queue
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.87 ▼0.5914.39 ▼27.83
Dashboard /wp-admin3.41 ▲0.1145.56 ▼2.19
Posts /wp-admin/edit.php3.24 ▼0.1228.66 ▼16.99
Add New Post /wp-admin/post-new.php6.01 ▲0.1379.71 ▼16.66
Media Library /wp-admin/upload.php3.34 ▲0.1140.37 ▲3.04

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 25 new files
Database: 2 new tables, 6 new options
New tables
wp_vq_status
wp_vq_sessions
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Virtual Queue
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,809 ▲5914.23 ▼0.361.70 ▼0.0141.49 ▼0.97
Dashboard /wp-admin2,218 ▲385.67 ▼0.0084.34 ▼8.7140.01 ▼7.45
Posts /wp-admin/edit.php2,120 ▲202.02 ▼0.1137.01 ▼0.6633.62 ▼2.38
Add New Post /wp-admin/post-new.php1,544 ▲1823.14 ▼0.32682.13 ▼18.7855.46 ▼0.84
Media Library /wp-admin/upload.php1,423 ▲234.14 ▼0.01111.52 ▲1.0247.51 ▼0.91

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/virtual-queue/public/partials/virtual-queue-public-display.php
    • > /wp-content/plugins/virtual-queue/admin/partials/virtual-queue-admin-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
3 plugin tags: queue, virtual queue, virtual

virtual-queue/virtual-queue.php Passed 13 tests

"Virtual Queue" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
67 characters long description:
Keep a virtual queue in case you have more traffic than you should.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected576 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP12206663554
Markdown19016
JavaScript24546
CSS2080

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity7.00
▷ Minimum class complexity1.00
▷ Maximum class complexity32.00
Average method complexity1.86
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods49
▷ Static methods1428.57%
▷ Public methods3265.31%
▷ Protected methods00.00%
▷ Private methods1734.69%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
1 PNG file occupies 0.19MB with 0.14MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshots/admin-settings.png192.38KB52.85KB▼ 72.53%