79% offen

Code Review | Offen

WordPress plugin Offen scored79%from 54 tests.

About plugin

  • Plugin page: offen
  • Plugin version: 3.9
  • PHP compatiblity: 5.3.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.1
  • WordPress version: 6.3.1
  • First release: Jul 2, 2017
  • Latest release: Feb 7, 2023
  • Number of updates: 81
  • Update frequency: every 25.3 days
  • Top authors: seoptix (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

800+ active /9,909 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▼1.51MB] [CPU: ▼46.83ms] Passed 4 tests

Server-side resources used by Offen
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.48 ▼0.9911.25 ▼31.32
Dashboard /wp-admin2.51 ▼0.8015.23 ▼38.46
Posts /wp-admin/edit.php2.51 ▼0.8513.76 ▼34.52
Add New Post /wp-admin/post-new.php2.51 ▼3.3913.82 ▼83.03
Media Library /wp-admin/upload.php2.51 ▼0.7315.16 ▼20.35

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 91 new files
Database: no new tables, 28 new options
New WordPress options
widget_theysaidso_widget
general_closed_all_day_text
can_compress_scripts
styling_colors_text_badge_closed
general_business_hours
styling_colors_background_primary
general_open_hours_message
styling_colors_background_badge_closed
styling_colors_background_badge_open
widget_recent-posts
...

Browser metrics Passed 4 tests

An overview of browser requirements for Offen
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,004 ▲24313.75 ▼0.901.71 ▼0.0843.12 ▲0.09
Dashboard /wp-admin2,410 ▲2365.56 ▼0.04104.06 ▲3.6142.70 ▼4.47
Posts /wp-admin/edit.php2,315 ▲2122.46 ▲0.4548.90 ▲13.1437.45 ▲0.67
Add New Post /wp-admin/post-new.php1,581 ▲5017.98 ▼5.38684.71 ▲89.7637.76 ▼20.34
Media Library /wp-admin/upload.php1,615 ▲2215.00 ▲0.73110.75 ▲9.7343.25 ▼0.56

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
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in business_hours_widget is deprecated since version 4.3.0! Use __construct() instead.
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • bh_uninstalled
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_business_hours_widget
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Screenshots: These screenshots lack descriptions #7, #8, #9 in offen/assets to your readme.txt
  • Tags: Please reduce the number of tags, currently 35 tag instead of maximum 10
The official readme.txt is a good inspiration

offen/offen.php Passed 13 tests

The main PHP file in "Offen" ver. 3.9 adds more information about the plugin and also serves as the entry point for this plugin
66 characters long description:
Display the company details and the opening hours at your website.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin28,581 lines of code in 66 files:
LanguageFilesBlank linesComment linesLines of code
CSS1115127011,408
JavaScript82,1802,2048,958
SVG3012,733
Sass1434341,768
LESS1434441,758
PHP143351211,528
PO File2174189428

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity30.00
▷ Minimum class complexity30.00
▷ Maximum class complexity30.00
Average method complexity6.80
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions34
▷ Named functions3397.06%
▷ Anonymous functions12.94%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
6 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
templates/assets/vendor/jquery-ui/images/ui-icons_555555_256x240.png6.82KB4.17KB▼ 38.82%
templates/assets/vendor/jquery-ui/images/ui-icons_777620_256x240.png4.44KB4.17KB▼ 6.02%
templates/assets/vendor/jquery-ui/images/ui-icons_cc0000_256x240.png4.44KB4.17KB▼ 6.02%
templates/assets/vendor/jquery-ui/images/ui-icons_444444_256x240.png6.83KB4.17KB▼ 38.86%
templates/assets/vendor/jquery-ui/images/ui-icons_ffffff_256x240.png6.15KB4.17KB▼ 32.13%