84% vystrahy-chmu

Code Review | Výstrahy ČHMÚ

WordPress plugin Výstrahy ČHMÚ scored 84% from 54 tests.

About plugin

  • Plugin page: vystrahy-chmu
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.2
  • WordPress version: 6.3.1
  • First release: Feb 22, 2017
  • Latest release: Jun 5, 2019
  • Number of updates: 17
  • Update frequency: every 49.0 days
  • Top authors: LuCash (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 562 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.01MB] [CPU: ▲5.29ms] Passed 4 tests

Analyzing server-side resources used by Výstrahy ČHMÚ
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0157.35 ▲17.80
Dashboard /wp-admin3.31 ▲0.0157.46 ▲1.08
Posts /wp-admin/edit.php3.36 ▲0.0153.14 ▼0.76
Add New Post /wp-admin/post-new.php5.89 ▲0.01114.24 ▲16.97
Media Library /wp-admin/upload.php3.24 ▲0.0139.48 ▲3.87

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-posts
widget_chmu-warnings

Browser metrics Passed 4 tests

A check of browser resources used by Výstrahy ČHMÚ
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▼014.48 ▼0.192.07 ▲0.1547.44 ▲1.81
Dashboard /wp-admin2,209 ▲34.89 ▼1.00103.64 ▲3.6039.09 ▲2.11
Posts /wp-admin/edit.php2,092 ▲32.04 ▼0.0139.37 ▲2.3434.19 ▼0.52
Add New Post /wp-admin/post-new.php1,533 ▲1423.16 ▼0.22623.54 ▼119.7853.83 ▼7.65
Media Library /wp-admin/upload.php1,388 ▼04.25 ▲0.05105.03 ▼18.6342.38 ▲0.86

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • can_compress_scripts
    • widget_recent-posts
    • widget_chmu-warnings
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/vystrahy-chmu/vystrahy-chmu.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
5 plugin tags: chmi, chmu, weather, meteo, warnings

vystrahy-chmu/vystrahy-chmu.php Passed 13 tests

The main PHP script in "Výstrahy ČHMÚ" version 0.1 is automatically included on every request by WordPress
72 characters long description:
Widget pro zobrazení výstrah Českého hydrometeorologického ústavu.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected81 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1242481

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.64
Average class complexity29.00
▷ Minimum class complexity29.00
▷ Maximum class complexity29.00
Average method complexity8.00
▷ Minimum method complexity1.00
▷ Maximum method complexity15.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%
Functions1
▷ Named functions1100.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
No PNG images were found in this plugin