10% wptermingermany

Code Review | wpTerminGermany

WordPress plugin wpTerminGermany scored10%from 54 tests.

About plugin

  • Plugin page: wptermingermany
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.9.1
  • WordPress version: 6.3.1
  • First release: Jul 13, 2014
  • Latest release: Jul 29, 2014
  • Number of updates: 7
  • Update frequency: every 3.7 days
  • Top authors: Daschmi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /627 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
You still need to fix the following installer errors
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/wptermingermany/model/wptg_monthwidget.class.php+3
    Methods with the same name as their class will not be constructors in a future version of PHP; wptg_monthwidget has a deprecated constructor

Server metrics [RAM: ▼1.70MB] [CPU: ▼47.61ms] Passed 4 tests

Server-side resources used by wpTerminGermany
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.29 ▼1.177.75 ▼30.75
Dashboard /wp-admin2.31 ▼1.0011.39 ▼39.18
Posts /wp-admin/edit.php2.31 ▼1.0511.45 ▼39.15
Add New Post /wp-admin/post-new.php2.31 ▼3.5812.43 ▼81.35
Media Library /wp-admin/upload.php2.31 ▼0.9210.79 ▼23.83
Konfiguration /wp-admin/edit.php?post_type=wptg_events&page=wptg-configuration2.3112.34
Termine /wp-admin/edit.php?post_type=wptg_events2.3113.38
Kalender /wp-admin/edit-tags.php?taxonomy=event_categorie&post_type=wptg_events2.3111.38
Add New /wp-admin/post-new.php?post_type=wptg_events2.3113.05

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 57 new files
Database: 1 new table, 7 new options
New tables
wp_wptg_import
New WordPress options
db_upgraded
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
widget_wptg_monthwidget

Browser metrics Passed 4 tests

Checking browser requirements for wpTerminGermany
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,940 ▲18314.05 ▼0.358.88 ▲7.0240.23 ▼8.53
Dashboard /wp-admin2,256 ▲684.94 ▲0.06101.12 ▼7.7840.50 ▼4.69
Posts /wp-admin/edit.php2,139 ▲502.10 ▲0.0944.21 ▲8.2836.57 ▲4.02
Add New Post /wp-admin/post-new.php1,565 ▲2718.14 ▼5.09656.60 ▼25.2152.02 ▼14.40
Media Library /wp-admin/upload.php1,432 ▲444.22 ▲0.0198.00 ▼11.7841.41 ▼7.81
Konfiguration /wp-admin/edit.php?post_type=wptg_events&page=wptg-configuration8801.7926.7124.76
Termine /wp-admin/edit.php?post_type=wptg_events1,1622.0734.0928.65
Kalender /wp-admin/edit-tags.php?taxonomy=event_categorie&post_type=wptg_events1,3152.2828.3533.37
Add New /wp-admin/post-new.php?post_type=wptg_events2,7607.99175.8776.49

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 25% 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
  • Uninstall procedure validation failed for this plugin
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in wptg_monthwidget is deprecated since version 4.3.0! Use __construct() instead.
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_wptg_import
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • widget_wptg_monthwidget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=wptg_events
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in wptg_monthwidget is deprecated since version 4.3.0! Use __construct() instead.
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=wptg_events
    • > Notice in wp-content/plugins/wptermingermany/lib/helper_functions.inc.php+49
    Undefined index: id
    • > GET request to /wp-admin/edit.php?post_type=wptg_events&page=wptg-configuration
    • > Notice in wp-content/plugins/wptermingermany/lib/helper_functions.inc.php+66
    Undefined index: size
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=wptg_events
    • > Notice in wp-content/plugins/wptermingermany/views/Form/datepicker.phtml+11
    Undefined index: placeholder

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/wptermingermany/lib/fullcalendar-1.6.4/demos/json-events.php
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/wptermingermany/wptermingermany.php on line 18
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wptermingermany/model/wptg_monthwidget.class.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_upload_dir() in wp-content/plugins/wptermingermany/wptermingermany.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 90% 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 need to be fixed:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === wptermingermany === )
You can take inspiration from this readme.txt

wptermingermany/wptermingermany.php 85% from 13 tests

"wpTerminGermany" version 0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Domain Path: The domain path folder does not exist ("/lang")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin6,970 lines of code in 38 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript61,3105554,451
PHP197012001,391
HTML8970671
CSS515474457

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity18.00
▷ Minimum class complexity2.00
▷ Maximum class complexity31.00
Average method complexity2.85
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods55
▷ Static methods11.82%
▷ Public methods55100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants16
▷ Global constants16100.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
15 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
lib/fullcalendar-1.6.4/demos/cupertino/images/ui-icons_ffffff_256x240.png6.15KB4.17KB▼ 32.13%
lib/fullcalendar-1.6.4/demos/cupertino/images/ui-bg_highlight-soft_100_deedf7_1x100.png0.38KB0.18KB▼ 52.97%
lib/fullcalendar-1.6.4/demos/cupertino/images/ui-bg_highlight-hard_70_000000_1x100.png0.24KB0.16KB▼ 35.34%
lib/fullcalendar-1.6.4/demos/cupertino/images/ui-icons_72a7cf_256x240.png4.44KB4.17KB▼ 6.02%
views/gfx/arrow_undo.png0.62KB0.67KB0.00%