10% corona-zahlen-deutschland-cng

Code Review | Corona Zahlen in Deutschland

WordPress plugin Corona Zahlen in Deutschland scored10%from 54 tests.

About plugin

  • Plugin page: corona-zahlen-deu...
  • Plugin version: 1.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.7
  • WordPress version: 6.3.1
  • First release: Apr 10, 2021
  • Latest release: Apr 10, 2021
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: MarcusHartmann (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /4,988 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
It is recommended to fix the following installer errors
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/corona-zahlen-deutschland-cng/inc/cng-page.php+53
    Undefined index: overlay_aktivieren

Server metrics [RAM: ▼1.67MB] [CPU: ▼54.24ms] Passed 4 tests

An overview of server-side resources used by Corona Zahlen in Deutschland
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.32 ▼1.149.01 ▼30.60
Dashboard /wp-admin2.34 ▼0.9610.05 ▼44.51
Posts /wp-admin/edit.php2.34 ▼1.0112.05 ▼41.78
Add New Post /wp-admin/post-new.php2.34 ▼3.5510.37 ▼100.08
Media Library /wp-admin/upload.php2.34 ▼0.8911.43 ▼27.10
Overlay /wp-admin/admin.php?page=overlay2.348.96
Shortcode /wp-admin/admin.php?page=shortcode2.3411.32
CNG Einstellungen /wp-admin/admin.php?page=cng_einstellungen2.349.08
Widget /wp-admin/admin.php?page=widget2.3410.64
Auto-Insert /wp-admin/admin.php?page=auto_insert2.3410.54

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 18 new files
Database: no new tables, 8 new options
New WordPress options
widget_cng-widget
coronaNumbersGermany
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Corona Zahlen in Deutschland
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,854 ▲9313.32 ▼1.045.47 ▲3.8243.58 ▲2.66
Dashboard /wp-admin2,260 ▲594.84 ▼0.10106.27 ▼12.7842.02 ▼1.16
Posts /wp-admin/edit.php2,142 ▲422.04 ▼0.0041.18 ▲3.3434.51 ▼0.05
Add New Post /wp-admin/post-new.php1,576 ▲3623.12 ▲4.92661.76 ▲2.0459.20 ▼7.50
Media Library /wp-admin/upload.php1,439 ▲394.20 ▼0.11108.28 ▲3.5544.43 ▼6.25
Overlay /wp-admin/admin.php?page=overlay8702.0329.8727.99
Shortcode /wp-admin/admin.php?page=shortcode8472.0223.4123.27
CNG Einstellungen /wp-admin/admin.php?page=cng_einstellungen8422.0622.6625.21
Widget /wp-admin/admin.php?page=widget8452.0425.3128.91
Auto-Insert /wp-admin/admin.php?page=auto_insert8752.0326.1628.36

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/corona-zahlen-deutschland-cng/inc/cng-page.php+53
    Undefined index: overlay_aktivieren
  • Zombie WordPress options detected upon uninstall: 8 options
    • widget_recent-posts
    • db_upgraded
    • coronaNumbersGermany
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_cng-widget
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These server-side errors were triggered
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=auto_insert
    • > Notice in wp-content/plugins/corona-zahlen-deutschland-cng/inc/cng-page.php+53
    Undefined index: overlay_aktivieren
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=auto_insert
    • > Notice in wp-content/plugins/corona-zahlen-deutschland-cng/inc/cng-page.php+62
    Undefined index: overlay_ausrichten

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
Please fix the following items
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/corona-zahlen-deutschland-cng/inc/cng-shortcode.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/corona-zahlen-deutschland-cng/inc/cng-overlay.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/corona-zahlen-deutschland-cng/inc/cng-page.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/corona-zahlen-deutschland-cng/inc/cng-overlay.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'CNG_ABSTRACT' not found in wp-content/plugins/corona-zahlen-deutschland-cng/inc/cng-autoinsert.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'CNG_ABSTRACT' not found in wp-content/plugins/corona-zahlen-deutschland-cng/inc/cng-widget.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 96% from 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
10 plugin tags: coronavirus, sars-cov-2, corona, pandemic, corona update...

corona-zahlen-deutschland-cng/index.php 92% from 13 tests

The main PHP script in "Corona Zahlen in Deutschland" version 1.0 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("corona-zahlen-deutschland-cng.php" instead of "index.php")

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 plugin1,624 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP91621871,173
Markdown1460309
CSS3160131
JavaScript11011

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.56
Average class complexity26.25
▷ Minimum class complexity1.00
▷ Maximum class complexity153.00
Average method complexity5.81
▷ Minimum method complexity1.00
▷ Maximum method complexity55.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes7
▷ Abstract classes114.29%
▷ Concrete classes685.71%
▷ Final classes00.00%
Methods43
▷ Static methods00.00%
▷ Public methods2865.12%
▷ Protected methods1227.91%
▷ Private methods36.98%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.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 were not PNG files found in your plugin