84% waldbrandgefahrenstufen

Code Review | Waldbrandgefahrenstufen

WordPress plugin Waldbrandgefahrenstufen scored84%from 54 tests.

About plugin

  • Plugin page: waldbrandgefahren...
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.9
  • WordPress version: 6.3.1
  • First release: Aug 14, 2021
  • Latest release: Feb 6, 2022
  • Number of updates: 4
  • Update frequency: every 44.8 days
  • Top authors: niklasullmann (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,195 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼4.07ms] Passed 4 tests

This is a short check of server-side resources used by Waldbrandgefahrenstufen
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0437.67 ▼2.93
Dashboard /wp-admin3.34 ▲0.0451.05 ▼0.71
Posts /wp-admin/edit.php3.40 ▲0.0444.80 ▼0.52
Add New Post /wp-admin/post-new.php5.93 ▲0.0482.81 ▼9.98
Media Library /wp-admin/upload.php3.27 ▲0.0333.13 ▼2.64

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Waldbrandgefahrenstufen
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲9213.24 ▼1.352.06 ▲0.1943.99 ▼4.99
Dashboard /wp-admin2,209 ▲214.86 ▼0.00110.04 ▼1.7942.84 ▼4.03
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0338.81 ▲0.1631.63 ▼0.59
Add New Post /wp-admin/post-new.php1,535 ▲222.93 ▼0.34652.24 ▼15.6259.70 ▲5.63
Media Library /wp-admin/upload.php1,391 ▲64.32 ▲0.06106.37 ▲7.1246.86 ▲2.54

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 7 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_waldbrandgefahrenstufen_widget
    • widget_recent-comments

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)
Good news, no errors were detected

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
Please fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/waldbrandgefahrenstufen/includes/waldbrandgefahrenstufen-scripts.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/waldbrandgefahrenstufen/includes/waldbrandgefahrenstufen-class.php:4

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 93% from 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
5 plugin tags: information, forest fires, germany, waldbrandgefahr, stable

waldbrandgefahrenstufen/waldbrandstufen.php 85% from 13 tests

The entry point to "Waldbrandgefahrenstufen" version 1.0.1 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("waldbrandgefahrenstufen.php" instead of "waldbrandstufen.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 155 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin175 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP32640157
JavaScript10018

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity16.00
▷ Minimum class complexity16.00
▷ Maximum class complexity16.00
Average method complexity4.75
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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 are no PNG files in this plugin