10% store-hours

Code Review | Storehours

WordPress plugin Storehours scored10%from 54 tests.

About plugin

  • Plugin page: store-hours
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0.2-3.9
  • WordPress version: 6.3.1
  • First release: Mar 11, 2014
  • Latest release: Apr 17, 2014
  • Number of updates: 12
  • Update frequency: every 3.2 days
  • Top authors: seoptix (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,353 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
It is recommended to fix the following installer errors
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/store-hours/storehours.php+77
    Methods with the same name as their class will not be constructors in a future version of PHP; OeffnungszeitenScriptWidget has a deprecated constructor

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

A check of server-side resources used by Storehours
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.09 ▼1.386.36 ▼34.15
Dashboard /wp-admin2.11 ▼1.244.86 ▼54.60
Posts /wp-admin/edit.php2.11 ▼1.255.75 ▼44.68
Add New Post /wp-admin/post-new.php2.11 ▼3.785.38 ▼96.13
Media Library /wp-admin/upload.php2.11 ▼1.125.50 ▼30.25
WP Offnungszeiten Script /wp-admin/options-general.php?page=wp_offnungszeiten_script2.115.39

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 34 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
widget_oeffnungszeiten_script
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Storehours
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,835 ▲10013.33 ▼1.061.94 ▲0.2941.02 ▼10.77
Dashboard /wp-admin2,219 ▲285.90 ▲1.02113.35 ▲7.7543.31 ▼1.83
Posts /wp-admin/edit.php2,099 ▲102.05 ▲0.0140.68 ▲0.0335.08 ▼0.63
Add New Post /wp-admin/post-new.php1,534 ▲2018.34 ▲0.60591.22 ▼102.1353.56 ▼1.55
Media Library /wp-admin/upload.php1,401 ▲104.15 ▼0.03101.13 ▼1.6243.42 ▼0.78
WP Offnungszeiten Script /wp-admin/options-general.php?page=wp_offnungszeiten_script6991.537.5324.36

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
The following items require your attention
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/store-hours/storehours.php+77
    Methods with the same name as their class will not be constructors in a future version of PHP; OeffnungszeitenScriptWidget has a deprecated constructor
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_oeffnungszeiten_script
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=wp_offnungszeiten_script
    • > Deprecated in wp-content/plugins/store-hours/storehours.php+77
    Methods with the same name as their class will not be constructors in a future version of PHP; OeffnungszeitenScriptWidget has a deprecated constructor
    • > GET request to /wp-admin/options-general.php?page=wp_offnungszeiten_script
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in OeffnungszeitenScriptWidget is deprecated since version 4.3.0! Use __construct() instead.
    • > GET request to /wp-admin/options-general.php?page=wp_offnungszeiten_script
    • > Error in wp-admin/includes/template.php+1801
    Uncaught ArgumentCountError: Too few arguments to function do_settings_fields(), 1 passed in wp-content/plugins/store-hours/templates/settings.php on line 8 and exactly 2 expected in wp-admin/includes/template.php:1801
    Stack trace:
    #0 wp-content/plugins/store-hours/templates/settings.php(8): do_settings_fields()
    #1 wp-content/plugins/store-hours/storehours.php(52): include('/var/www/wordpr...')
    #2 wp-includes/class-wp-hook.php(310): WP_Offnungszeiten_Script->plugin_settings_page()
    #3 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #4 wp-includes/plugin.php(517): WP_Hook->do_action()
    #5 wp-admin/admin.php(259): do_action()
    #6 wp-admin/options-general.php(10): require_once('/var/www/wordpr...')
    #7 {main}
    thrown

SRP 50% from 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
The following issues need your attention
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/store-hours/storehours.php:77
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/store-hours/templates/settings.php:7

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following browser errors
    • > GET request to /wp-admin/options-general.php?page=wp_offnungszeiten_script
    • > Network (severe)
    wp-content/plugins/oeffnungszeiten/templates/css/colorpicker.css?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/options-general.php?page=wp_offnungszeiten_script
    • > Network (severe)
    wp-content/plugins/oeffnungszeiten/templates/css/style.css?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/options-general.php?page=wp_offnungszeiten_script
    • > Network (severe)
    wp-content/plugins/oeffnungszeiten/templates/js/widgetColorpicker.js?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Donate link: Invalid URI found ("thanx - not necessary")
  • Tags: Too many tags (19 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

store-hours/storehours.php 92% from 13 tests

The entry point to "Storehours" version 1.0.0 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("store-hours.php" instead of "storehours.php")

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
Everything looks great! No dangerous files found in this plugin1,370 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript4421813
CSS2160296
PHP24512261

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.09
Average class complexity1.50
▷ Minimum class complexity1.00
▷ Maximum class complexity2.00
Average method complexity1.10
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods10
▷ Static methods330.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
21 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/images/colorpicker_background.png1.85KB2.14KB0.00%
templates/images/select.png0.49KB0.33KB▼ 33.40%
templates/images/custom_hsb_h.png0.95KB0.73KB▼ 23.40%
templates/images/colorpicker_rgb_b.png0.95KB0.76KB▼ 19.48%
templates/images/custom_hex.png0.55KB0.39KB▼ 28.11%