78% shabbos-and-yom-tov

Code Review | Shabbos and Yom Tov

WordPress plugin Shabbos and Yom Tov scored78%from 54 tests.

About plugin

  • Plugin page: shabbos-and-yom-tov
  • Plugin version: 1.9
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3.0-4.9.7
  • WordPress version: 6.3.1
  • First release: Oct 10, 2018
  • Latest release: Nov 30, 2018
  • Number of updates: 40
  • Update frequency: every 1.3 days
  • Top authors: shabboscommerce (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /765 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼3.64ms] Passed 4 tests

Server-side resources used by Shabbos and Yom Tov
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0537.28 ▼3.81
Dashboard /wp-admin3.39 ▲0.0845.00 ▼4.58
Posts /wp-admin/edit.php3.44 ▲0.0850.50 ▲2.54
Add New Post /wp-admin/post-new.php5.97 ▲0.0892.10 ▼4.74
Media Library /wp-admin/upload.php3.31 ▲0.0833.04 ▼1.41
Shabbos And Yom Tov /wp-admin/options-general.php?page=shabbos_and_yom_tov3.2831.55

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
shabbos_options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Shabbos and Yom Tov
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲9413.19 ▼1.421.84 ▼0.0940.73 ▼4.54
Dashboard /wp-admin2,210 ▲255.88 ▲0.00106.10 ▼8.3141.43 ▼6.71
Posts /wp-admin/edit.php2,096 ▲72.01 ▼0.0439.93 ▲5.0035.06 ▲2.07
Add New Post /wp-admin/post-new.php1,545 ▲918.10 ▼5.24615.38 ▼48.2549.97 ▼0.91
Media Library /wp-admin/upload.php1,392 ▲104.19 ▲0.0195.58 ▼3.8741.11 ▼2.58
Shabbos And Yom Tov /wp-admin/options-general.php?page=shabbos_and_yom_tov1,0872.0225.0133.42

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/shabbos-and-yom-tov/admin.php:3

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There are user-side issues you should fix
    • > GET request to /wp-admin/options-general.php?page=shabbos_and_yom_tov
    • > Network (severe)
    wp-content/plugins/shabbos-and-yomtov/scripts.js?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (Basic example:), #2 (Basic example for Baltimore:), #3 (Basic example for Los Angeles:), #4 (Basic example for Jerusalem:), #5 (Woocommerce example to use on Checkout page:), #6 (Another Woocommerce example to use on Checkout page:), #7 (Example to use on Contact Us page:), #8 (Example to use on Contact Us page to show until midnight:)
You can look at the official readme.txt

shabbos-and-yom-tov/Shabbos-and-YomTov.php 92% from 13 tests

The main PHP script in "Shabbos and Yom Tov" version 1.9 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("shabbos-and-yom-tov.php" instead of "Shabbos-and-YomTov.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin690 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP217047616
JavaScript123374

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.62
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%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
No PNG files were detected