84% vaeret

Code Review | Været

WordPress plugin Været scored84%from 54 tests.

About plugin

  • Plugin page: vaeret
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.1-5.3
  • WordPress version: 6.3.1
  • First release: Oct 19, 2019
  • Latest release: Oct 26, 2019
  • Number of updates: 5
  • Update frequency: every 1.6 days
  • Top authors: avivvaeret (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /477 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▲0.38ms] Passed 4 tests

This is a short check of server-side resources used by Været
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0942.08 ▲2.84
Dashboard /wp-admin3.39 ▲0.0846.68 ▲1.54
Posts /wp-admin/edit.php3.50 ▲0.1443.47 ▲1.06
Add New Post /wp-admin/post-new.php5.99 ▲0.1089.71 ▼2.23
Media Library /wp-admin/upload.php3.31 ▲0.0834.33 ▲1.16

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Været
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,901 ▲14013.55 ▼0.819.38 ▲7.7443.68 ▼2.35
Dashboard /wp-admin2,199 ▲255.50 ▼0.0889.33 ▲3.6141.69 ▲2.03
Posts /wp-admin/edit.php2,104 ▲42.02 ▲0.0136.03 ▼2.9334.54 ▲0.39
Add New Post /wp-admin/post-new.php1,539 ▲1318.20 ▼5.50600.91 ▼72.2163.85 ▲5.01
Media Library /wp-admin/upload.php1,398 ▼24.19 ▼0.0093.30 ▼12.6740.41 ▼5.07

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_vaeret_widget
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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 output text when accessed directly:
    • > /wp-content/plugins/vaeret/public/partials/vaeret-public-display.php
    • > /wp-content/plugins/vaeret/admin/partials/vaeret-admin-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
8 plugin tags: vaeret, vaer, oslo, norge, vrmelding...

vaeret/vaeret.php 92% from 13 tests

The entry point to "Været" version 1.0.0 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin748 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12145543400
JavaScript24062186
CSS2214162

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity4.88
▷ Minimum class complexity1.00
▷ Maximum class complexity29.00
Average method complexity2.15
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods27
▷ Static methods27.41%
▷ Public methods2281.48%
▷ Protected methods00.00%
▷ Private methods518.52%
Functions4
▷ Named functions4100.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
There were not PNG files found in your plugin