10% tagesmenue

Code Review | Tagesmenue Widget

WordPress plugin Tagesmenue Widget scored10%from 54 tests.

About plugin

  • Plugin page: tagesmenue
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9.4
  • WordPress version: 6.3.1
  • First release: Feb 28, 2018
  • Latest release: Mar 23, 2018
  • Number of updates: 20
  • Update frequency: every 1.2 days
  • Top authors: colbeinformatik (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /576 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
These installer errors require your attention
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/tagesmenue/inc/class.admin.php+19
    Methods with the same name as their class will not be constructors in a future version of PHP; TAGESMENUE_Admin has a deprecated constructor

Server metrics [RAM: ▼1.82MB] [CPU: ▼54.58ms] Passed 4 tests

An overview of server-side resources used by Tagesmenue Widget
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0236.31 ▼7.04
Dashboard /wp-admin2.13 ▼1.215.68 ▼62.95
Posts /wp-admin/edit.php2.13 ▼1.227.14 ▼38.22
Add New Post /wp-admin/post-new.php2.13 ▼3.756.66 ▼88.40
Media Library /wp-admin/upload.php2.13 ▼1.106.18 ▼28.75
Tagesmenue /wp-admin/options-general.php?page=TAGESMENUE-options2.136.08

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 27 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
TAGESMENUE_options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Tagesmenue Widget
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,141 ▲39515.63 ▲1.009.28 ▲7.3938.07 ▼5.76
Dashboard /wp-admin2,351 ▲1666.44 ▲1.58133.12 ▲25.5239.14 ▼6.44
Posts /wp-admin/edit.php2,264 ▲1753.42 ▲1.3945.38 ▲8.7830.40 ▼1.63
Add New Post /wp-admin/post-new.php1,521 ▼723.51 ▲5.05643.34 ▲26.1235.91 ▼18.85
Media Library /wp-admin/upload.php1,393 ▲84.16 ▼0.0880.82 ▼19.0842.10 ▼3.62
Tagesmenue /wp-admin/options-general.php?page=TAGESMENUE-options9863.1638.4725.59

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/tagesmenue/inc/class.admin.php+19
    Methods with the same name as their class will not be constructors in a future version of PHP; TAGESMENUE_Admin has a deprecated constructor
  • Zombie WordPress options detected upon uninstall: 7 options
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • TAGESMENUE_options
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=TAGESMENUE-options
    • > Deprecated in wp-content/plugins/tagesmenue/inc/class.admin.php+19
    Methods with the same name as their class will not be constructors in a future version of PHP; TAGESMENUE_Admin has a deprecated constructor

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/tagesmenue/tagesmenue.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/tagesmenue/tagesmenue-katalog-widget.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/tagesmenue/tagesmenue-widget.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/tagesmenue/tagesmenue-button-widget.php:19

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 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
3 plugin tags: tagesmenue, daily menu, menu cards

tagesmenue/tagesmenue.php 92% from 13 tests

The entry point to "Tagesmenue Widget" version 1.0.0 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes

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 detected1,397 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP57493487
Markdown22160425
JavaScript72116334
CSS42625151

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity9.75
▷ Minimum class complexity1.00
▷ Maximum class complexity18.00
Average method complexity2.94
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods18
▷ Static methods00.00%
▷ Public methods18100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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
7 PNG files occupy 0.15MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
js/colorbox/css/images/border2.png0.11KB0.16KB0.00%
js/colorbox/css/images/border1.png0.61KB0.82KB0.00%
js/colorbox/css/images/controls.png1.23KB1.28KB0.00%
images/speisekarte.png48.30KB14.78KB▼ 69.40%
images/weinkarte.png48.87KB15.80KB▼ 67.66%