10% stargutschein-gutschein-widget

Code Review | StarGutschein Gutschein Widget

WordPress plugin StarGutschein Gutschein Widget scored 10% from 54 tests.

About plugin

  • Plugin page: stargutschein-gut...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8+
  • WordPress version: 6.3.1
  • First release: Jul 17, 2014
  • Latest release: Jul 29, 2014
  • Number of updates: 6
  • Update frequency: every 2.2 days
  • Top authors: StarGutschein (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 662 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
You still need to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/stargutschein-gutschein-widget/stargutschein.widget.php+49
    Methods with the same name as their class will not be constructors in a future version of PHP; StargutscheinWidget has a deprecated constructor

Server metrics [RAM: ▼1.91MB] [CPU: ▼53.21ms] Passed 4 tests

This is a short check of server-side resources used by StarGutschein Gutschein Widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.08 ▼1.384.52 ▼36.71
Dashboard /wp-admin2.10 ▼1.207.24 ▼40.13
Posts /wp-admin/edit.php2.10 ▼1.265.96 ▼43.94
Add New Post /wp-admin/post-new.php2.10 ▼3.795.41 ▼92.06
Media Library /wp-admin/upload.php2.10 ▼1.135.90 ▼26.84

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_stargutschein-gutscheine
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for StarGutschein Gutschein Widget
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4313.57 ▼1.021.69 ▼0.2142.59 ▼4.69
Dashboard /wp-admin2,206 ▲155.91 ▲0.03100.49 ▼4.0435.76 ▼6.57
Posts /wp-admin/edit.php2,089 ▼02.03 ▲0.0235.96 ▼4.1234.68 ▲1.53
Add New Post /wp-admin/post-new.php1,520 ▼1723.29 ▼0.01667.24 ▲0.7870.67 ▼1.07
Media Library /wp-admin/upload.php1,385 ▼34.16 ▼0.01101.21 ▼10.9845.79 ▼2.86

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/stargutschein-gutschein-widget/stargutschein.widget.php+49
    Methods with the same name as their class will not be constructors in a future version of PHP; StargutscheinWidget has a deprecated constructor
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_stargutschein-gutscheine
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

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 fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/stargutschein-gutschein-widget/stargutschein.widget.php:37

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Screenshots: Screenshot #1 (Die Optionen des Widgets) image not found
You can take inspiration from this readme.txt

stargutschein-gutschein-widget/stargutschein.widget.php 92% from 13 tests

"StarGutschein Gutschein Widget" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("stargutschein-gutschein-widget.php" instead of "stargutschein.widget.php")

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
There were no executable files found in this plugin91 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1345891

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity17.00
▷ Minimum class complexity17.00
▷ Maximum class complexity17.00
Average method complexity5.00
▷ Minimum method complexity1.00
▷ Maximum method complexity11.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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.04MB with 0.03MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot_2.png23.74KB7.27KB▼ 69.35%
screenshot_1.png22.00KB7.97KB▼ 63.77%