10% mietshop-shopsystem

Code Review | Mietshop Shopsystem

WordPress plugin Mietshop Shopsystem scored10%from 54 tests.

About plugin

  • Plugin page: mietshop-shopsystem
  • Plugin version: 0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.8.2
  • WordPress version: 6.3.1
  • First release: Sep 15, 2014
  • Latest release: Oct 4, 2017
  • Number of updates: 11
  • Update frequency: every 101.6 days
  • Top authors: h.drees (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,253 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The following installer errors require your attention
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/mietshop-shopsystem/cosmoshop-widget-functions.php+3
    Methods with the same name as their class will not be constructors in a future version of PHP; CosmoshopWidget has a deprecated constructor

Server metrics [RAM: ▼1.80MB] [CPU: ▼56.78ms] Passed 4 tests

Analyzing server-side resources used by Mietshop Shopsystem
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.19 ▼1.275.36 ▼37.29
Dashboard /wp-admin2.21 ▼1.135.99 ▼57.82
Posts /wp-admin/edit.php2.21 ▼1.146.64 ▼42.41
Add New Post /wp-admin/post-new.php2.21 ▼3.676.47 ▼89.59
Media Library /wp-admin/upload.php2.21 ▼1.025.84 ▼28.19

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 25 new files
Database: no new tables, 26 new options
New WordPress options
widget_recent-posts
widget_cosmoshop-widget
cosmoshop-widget-style
cosmoshop-widget-adminkonfiguration-texteditor-button-anzeigen
cosmoshop-widget-cachingzeit
cosmoshop-widget-preishinweis
cosmoshop-widget-sprache
cosmoshop-widget-install
can_compress_scripts
cosmoshop-widget-adminkonfiguration-tinymce-platzhalter-anzeigen
...

Browser metrics Passed 4 tests

An overview of browser requirements for Mietshop Shopsystem
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,879 ▲11813.51 ▼0.848.15 ▲6.4544.42 ▼1.54
Dashboard /wp-admin2,198 ▲215.54 ▼0.0795.09 ▼3.6643.03 ▼1.49
Posts /wp-admin/edit.php2,107 ▲102.02 ▲0.0233.68 ▼2.2633.56 ▼1.49
Add New Post /wp-admin/post-new.php1,537 ▲923.25 ▲0.25654.99 ▼6.4751.27 ▼6.68
Media Library /wp-admin/upload.php1,410 ▲104.18 ▲0.00103.07 ▲6.7346.30 ▲0.92
Mietshop Shopsystem /wp-admin/cosmoshop-widget-functions.php260.420.0913.71

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/mietshop-shopsystem/cosmoshop-widget-functions.php+3
    Methods with the same name as their class will not be constructors in a future version of PHP; CosmoshopWidget has a deprecated constructor
  • This plugin does not fully uninstall, leaving 8 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_cosmoshop-widget
    • widget_recent-comments
    • widget_cosmoshop-widget_text

Smoke tests 25% 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 0% 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 take a closer look at the following
  • 4× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/mietshop-shopsystem/mietshop-shopsystem.php
    • > /wp-content/plugins/mietshop-shopsystem/template/text_content_artikelvorschau_default.php
    • > /wp-content/plugins/mietshop-shopsystem/template/text_content_highlight_default.php
    • > /wp-content/plugins/mietshop-shopsystem/template/text_content_bestseller_default.php
  • 43× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Notice
      Undefined variable: parameter in wp-content/plugins/mietshop-shopsystem/template/iframe_widget_bestseller_default.php on line 3
    • > PHP Notice
      Undefined variable: shop_widget_html in wp-content/plugins/mietshop-shopsystem/template/text_content_highlight_default.php on line 2
    • > PHP Notice
      Undefined variable: widget_style in wp-content/plugins/mietshop-shopsystem/template/text_widget_artikelvorschau_default.php on line 2
    • > PHP Notice
      Undefined variable: script in wp-content/plugins/mietshop-shopsystem/template/iframe_content_artikelvorschau_default.php on line 3
    • > PHP Notice
      Undefined variable: widget_style in wp-content/plugins/mietshop-shopsystem/template/text_widget_bestseller_default.php on line 2
    • > PHP Notice
      Undefined variable: widget_id in wp-content/plugins/mietshop-shopsystem/template/iframe_content_bestseller_default.php on line 3
    • > PHP Notice
      Undefined variable: parameter in wp-content/plugins/mietshop-shopsystem/template/iframe_content_bestseller_default.php on line 3
    • > PHP Notice
      Undefined variable: widget_style in wp-content/plugins/mietshop-shopsystem/template/iframe_content_artikelvorschau_default.php on line 2
    • > PHP Notice
      Undefined variable: script in wp-content/plugins/mietshop-shopsystem/template/iframe_widget_highlight_default.php on line 3
    • > PHP Notice
      Undefined variable: script in wp-content/plugins/mietshop-shopsystem/template/iframe_widget_artikelvorschau_default.php on line 3

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There are user-side issues you should fix
    • > GET request to /wp-admin/cosmoshop-widget-functions.php
    • > Network (severe)
    wp-admin/cosmoshop-widget-functions.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
9 plugin tags: shoppingcart, cart, eshop widget, cosmoshop, ecommerce...

mietshop-shopsystem/mietshop-shopsystem.php 92% from 13 tests

The primary PHP file in "Mietshop Shopsystem" version 0.2 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Description: The description should be shorter than 140 characters (currently 148 characters long)

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
There were no executable files found in this plugin932 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP1612136679
JavaScript12319176
CSS214577

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for 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.75
▷ Minimum class complexity2.00
▷ Maximum class complexity39.00
Average method complexity3.23
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods30
▷ Static methods26.67%
▷ Public methods30100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants133.33%
▷ Class constants266.67%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
4 PNG files occupy 0.11MB with 0.06MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
pic/wysiwyg_cosmoshopwidget_icon.png0.27KB0.18KB▼ 34.88%
pic/wysiwyg_cosmoshopwidget_artikelvorschau.png38.62KB14.75KB▼ 61.80%
pic/wysiwyg_cosmoshopwidget_bestseller.png35.68KB13.40KB▼ 62.45%
pic/wysiwyg_cosmoshopwidget_highlight.png40.58KB15.64KB▼ 61.46%