83% m1miniweather

Code Review | m1.MiniWeather

WordPress plugin m1.MiniWeather scored83%from 54 tests.

About plugin

  • Plugin page: m1miniweather
  • Plugin version: 0.3
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.2.2
  • WordPress version: 6.3.1
  • First release: Apr 25, 2016
  • Latest release: Jul 31, 2023
  • Number of updates: 5
  • Update frequency: every 531.0 days
  • Top authors: maennchen1.de (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

400+ active /8,297 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.06MB] [CPU: ▼6.70ms] Passed 4 tests

Server-side resources used by m1.MiniWeather
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0738.15 ▼4.95
Dashboard /wp-admin3.37 ▲0.0645.85 ▼4.23
Posts /wp-admin/edit.php3.42 ▲0.0642.98 ▼5.02
Add New Post /wp-admin/post-new.php5.95 ▲0.0678.82 ▼12.59
Media Library /wp-admin/upload.php3.29 ▲0.0634.91 ▲1.36

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 16 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_m1_miniweather_widget
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for m1.MiniWeather
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲3014.39 ▼0.171.72 ▲0.1545.57 ▲6.17
Dashboard /wp-admin2,198 ▲205.63 ▼0.0783.81 ▼18.6638.40 ▼2.10
Posts /wp-admin/edit.php2,097 ▼31.95 ▼0.0236.01 ▲1.2534.85 ▼0.45
Add New Post /wp-admin/post-new.php1,526 ▼023.35 ▼0.21669.52 ▼15.3060.85 ▲5.46
Media Library /wp-admin/upload.php1,403 ▲34.20 ▲0.0295.90 ▲0.2243.75 ▼1.98

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
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_m1_miniweather_widget
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% 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 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
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/m1miniweather/index.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Screenshots: These screenshots require images: #1 (example screenshot), #2 (find longitude (e.g. 13.41053) & latitude (e.g. 52.524368)), #3 (WordPress backend, Widget m1.MiniWeather)
  • Tags: There are too many tags (18 tag instead of maximum 10)
Please take inspiration from this readme.txt

m1miniweather/index.php 85% from 13 tests

The main file in "m1.MiniWeather" v. 0.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("m1miniweather.php" instead of "index.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected499 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
SVG100257
PHP13824131
PO File23232110
CSS10401

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity9.50
▷ Minimum class complexity6.00
▷ Maximum class complexity13.00
Average method complexity3.43
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods7
▷ Static methods228.57%
▷ 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
3 PNG files occupy 0.38MB with 0.25MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png72.41KB23.80KB▼ 67.12%
screenshot-1.png273.18KB101.20KB▼ 62.96%
screenshot-3.png43.97KB15.18KB▼ 65.47%