84% meteohub

Code Review | Meteohub

WordPress plugin Meteohub scored84%from 54 tests.

About plugin

  • Plugin page: meteohub
  • Plugin version: 1.3
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Mar 31, 2014
  • Latest release: Mar 26, 2023
  • Number of updates: 17
  • Update frequency: every 193.2 days
  • Top authors: daanzk (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,906 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼0.79ms] Passed 4 tests

Analyzing server-side resources used by Meteohub
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0340.56 ▼2.37
Dashboard /wp-admin3.34 ▲0.0347.11 ▼0.91
Posts /wp-admin/edit.php3.39 ▲0.0347.14 ▲3.94
Add New Post /wp-admin/post-new.php5.92 ▲0.0386.00 ▼1.27
Media Library /wp-admin/upload.php3.26 ▲0.0334.29 ▲1.40
Meteohub /wp-admin/options-general.php?page=Meteohub3.2333.62

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
db_upgraded
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Meteohub
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.34 ▲0.141.68 ▲0.0140.74 ▼5.44
Dashboard /wp-admin2,199 ▲195.56 ▼0.2380.52 ▼19.6437.16 ▼5.61
Posts /wp-admin/edit.php2,101 ▲11.98 ▼0.0533.25 ▼4.7336.98 ▲4.21
Add New Post /wp-admin/post-new.php1,529 ▲123.19 ▲0.34656.01 ▼8.2457.38 ▲0.40
Media Library /wp-admin/upload.php1,407 ▲134.23 ▲0.0599.00 ▼2.2443.38 ▼1.30
Meteohub /wp-admin/options-general.php?page=Meteohub8752.0225.4931.67

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
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
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/meteohub/meteohub.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === meteohub === )
The official readme.txt is a good inspiration

meteohub/meteohub.php Passed 13 tests

The principal PHP file in "Meteohub" v. 1.3 is loaded by WordPress automatically on each request
80 characters long description:
Displays data from a meteohub or meteobridge file in the content with shorttags.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin147 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP11912147

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin