84% weer

Code Review | Weer

WordPress plugin Weer scored 84% from 54 tests.

About plugin

  • Plugin page: weer
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.1-5.8
  • WordPress version: 5.8.1
  • First release: Apr 11, 2019
  • Latest release: Jul 16, 2021
  • Number of updates: 70
  • Update frequency: every 11.8 days
  • Top authors: zurandmorog (100%)

Code review

54 tests

User reviews

1 review

Install metrics

600+ active / 3,168 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼144.42ms] Passed 4 tests

An overview of server-side resources used by Weer
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.92 ▲0.0939.80 ▲2.22
Dashboard /wp-admin3.14 ▲0.0953.15 ▲10.57
Posts /wp-admin/edit.php3.25 ▲0.1350.19 ▼3.67
Add New Post /wp-admin/post-new.php5.50 ▲0.0689.49 ▼568.81
Media Library /wp-admin/upload.php3.08 ▲0.0828.38 ▼7.43

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 27 new files
Database: no new tables, 1 new option
New WordPress options
widget_weer_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Weer
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,816 ▲17916.40 ▲0.6913.73 ▲3.7449.30 ▼2.21
Dashboard /wp-admin2,977 ▲465.86 ▼0.16137.52 ▼8.59113.68 ▼10.23
Posts /wp-admin/edit.php2,743 ▲42.70 ▲0.0271.54 ▲2.20102.63 ▲4.64
Add New Post /wp-admin/post-new.php1,687 ▲1718.55 ▼0.63380.67 ▲9.00110.75 ▼5.37
Media Library /wp-admin/upload.php1,811 ▲75.02 ▼0.01152.64 ▲0.96121.92 ▼6.41

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 1 option in the database
    • widget_weer_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/weer/public/partials/weer-public-display.php
    • > /wp-content/plugins/weer/admin/partials/weer-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, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Screenshots: No descriptions were found for these screenshots #1, #2, #3 in weer/assets to your readme.txt
You can look at the official readme.txt

weer/weer.php Passed 13 tests

The main file in "Weer" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
42 characters long description:
The best Dutch weather forecasting widget.

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
There were no executable files found in this plugin961 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP12151543414
CSS2328278
JavaScript257101211
SVG50058

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity4.75
▷ Minimum class complexity1.00
▷ Maximum class complexity28.00
Average method complexity2.11
▷ Minimum method complexity1.00
▷ Maximum method complexity25.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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin