10% wp-shabbat

Code Review | WP-Shabbat

WordPress plugin WP-Shabbat scored10%from 54 tests.

About plugin

  • Plugin page: wp-shabbat
  • Plugin version: 2.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7.0-4.8.1
  • WordPress version: 6.3.1
  • First release: Nov 20, 2013
  • Latest release: Sep 17, 2017
  • Number of updates: 99
  • Update frequency: every 14.4 days
  • Top authors: drmosko (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

40+ active /6,817 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
These installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/wp-shabbat/timezone/timezone.php+2234
    Undefined variable: timezone

Server metrics [RAM: ▼0.21MB] [CPU: ▼52.34ms] Passed 4 tests

A check of server-side resources used by WP-Shabbat
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.84 ▲0.3313.15 ▼28.32
Dashboard /wp-admin3.86 ▲0.4712.82 ▼49.32
Posts /wp-admin/edit.php3.86 ▲0.4613.11 ▼41.47
Add New Post /wp-admin/post-new.php3.86 ▼2.0814.69 ▼90.25
Media Library /wp-admin/upload.php3.86 ▲0.5912.49 ▼26.03
WP-Shabbat /wp-admin/options-general.php?page=wp_shabbat_admin3.8612.34

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 22 new files
Database: no new tables, 10 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
wp_shabbat_settings_richtext
wp_shabbat_update_settings
db_upgraded
widget_recent-posts
wp_shabbat_settings_hide_classes
wp_shabbat_settings

Browser metrics Passed 4 tests

WP-Shabbat: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,821 ▲6014.35 ▼0.012.49 ▲0.5246.10 ▲0.32
Dashboard /wp-admin2,199 ▲225.63 ▼0.0288.13 ▼4.2639.85 ▼1.74
Posts /wp-admin/edit.php2,107 ▲71.94 ▼0.0840.69 ▲0.1938.17 ▼3.94
Add New Post /wp-admin/post-new.php1,539 ▲418.36 ▲0.01626.12 ▼41.8773.61 ▼3.51
Media Library /wp-admin/upload.php1,407 ▲74.18 ▼0.07106.62 ▲1.4847.76 ▲3.65
WP-Shabbat /wp-admin/options-general.php?page=wp_shabbat_admin9451.9927.2638.75

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/wp-shabbat/timezone/timezone.php+2234
    Undefined variable: timezone
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=wp_shabbat_admin
    • > Notice in wp-content/plugins/wp-shabbat/timezone/timezone.php+2234
    Undefined variable: timezone
  • 11 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wp_shabbat_admin
    • > Warning in wp-content/plugins/easy-age-verifier/lib/extras/wpApi.php+48
    file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known
  • 11 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wp_shabbat_admin
    • > Warning in wp-content/plugins/easy-age-verifier/lib/extras/wpApi.php+48
    file_get_contents(http://www.fillyourtaproom.com/wp-json/wp/v2/posts?per_page=10): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known

SRP 0% 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
Please fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/wp-shabbat/wp-shabbat.php
  • 7× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wp-shabbat/wp-shabbat-update.php:5
    • > PHP Notice
      Undefined variable: dayDetails in wp-content/plugins/wp-shabbat/wp-shabbat-countdown.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-shabbat/wp-shabbat-countdown.php:108
    • > PHP Notice
      Undefined variable: diff in wp-content/plugins/wp-shabbat/wp-shabbat-countdown.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-shabbat/wp-shabbat-popup.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wp-shabbat/wp-shabbat-user.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_shabbat_user_time() in wp-content/plugins/wp-shabbat/wp-shabbat-functions.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

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
6 plugin tags: popup window, close site, shabbat, popup message, 503...

wp-shabbat/wp-shabbat.php 92% from 13 tests

The entry point to "WP-Shabbat" version 2.3 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Text Domain: The text domain should only use lowercase characters and dashes

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
Success! There were no dangerous files found in this plugin8,375 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP92921337,533
PO File21541,523411
Pascal2621,692381
CSS26134
JavaScript15016

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions40
▷ Named functions40100.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
There are no PNG files in this plugin