88% vii-related-posts

Code Review | Vii Related Posts

WordPress plugin Vii Related Posts scored 88% from 54 tests.

About plugin

  • Plugin page: vii-related-posts
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-5.8.2
  • WordPress version: 5.9.2
  • First release: Dec 1, 2021
  • Latest release: Dec 1, 2021
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: viistudio (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 66 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼291.57ms] Passed 4 tests

A check of server-side resources used by Vii Related Posts
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1156.16 ▲3.46
Dashboard /wp-admin3.46 ▲0.0433.60 ▼1.82
Posts /wp-admin/edit.php3.69 ▲0.0486.38 ▲48.39
Add New Post /wp-admin/post-new.php6.93 ▼0.0598.90 ▼1,168.11
Media Library /wp-admin/upload.php3.34 ▲0.0424.61 ▲0.18

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Vii Related Posts: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,795 ▲5316.18 ▲0.405.77 ▲0.082.57 ▲0.36
Dashboard /wp-admin2,889 ▲316.11 ▼0.02130.62 ▼1.06165.66 ▲2.92
Posts /wp-admin/edit.php2,694 ▲33.23 ▲0.0166.46 ▲1.75147.29 ▲0.86
Add New Post /wp-admin/post-new.php1,661 ▲2316.10 ▼4.66434.88 ▼2.91160.56 ▲11.83
Media Library /wp-admin/upload.php1,695 ▼35.47 ▼0.07136.40 ▼6.62183.84 ▼5.81

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/vii-related-posts/vii-related-posts.php
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/vii-related-posts/inc/vii-related-posts-widget.php:2

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 90% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Screenshots: Screenshot #1 (The Vii Related Posts widget.) image required
  • Donate link: Invalid URI ("")
The official readme.txt might help

vii-related-posts/vii-related-posts.php 92% from 13 tests

This is the main PHP file of "Vii Related Posts" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 237 characters long)

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 plugin180 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP21716180

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity21.50
▷ Minimum class complexity1.00
▷ Maximum class complexity42.00
Average method complexity6.86
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods7
▷ Static methods114.29%
▷ Public methods7100.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

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin