89% keep-sabbath

Code Review | Keep Sabbath

WordPress plugin Keep Sabbath scored89%from 54 tests.

About plugin

  • Plugin page: keep-sabbath
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.3
  • WordPress version: 6.3.1
  • First release: Oct 16, 2023
  • Latest release: Oct 16, 2023
  • Number of updates: 4
  • Update frequency: every 5.3 days
  • Top authors: correctsyntax (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /23 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.09MB] [CPU: ▼3.91ms] Passed 4 tests

A check of server-side resources used by Keep Sabbath
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0837.84 ▼2.72
Dashboard /wp-admin3.40 ▲0.0648.77 ▼7.50
Posts /wp-admin/edit.php3.52 ▲0.1647.23 ▲1.16
Add New Post /wp-admin/post-new.php5.99 ▲0.1089.41 ▼3.48
Media Library /wp-admin/upload.php3.33 ▲0.1034.23 ▼1.93
Keep Sabbath /wp-admin/options-general.php?page=keepsabbath3.2932.79

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, 11 new options
New WordPress options
keepsabbath_setting_latitude
keepsabbath_setting_pages_to_redirect
keepsabbath_setting_redirect_to_page
keepsabbath_setting_longitude
widget_recent-comments
keepsabbath_setting_holy_day_dates
db_upgraded
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
...

Browser metrics Passed 4 tests

A check of browser resources used by Keep Sabbath
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲4714.35 ▼0.231.72 ▲0.1744.09 ▲4.17
Dashboard /wp-admin2,199 ▲225.61 ▼0.0288.96 ▲3.5044.74 ▲5.86
Posts /wp-admin/edit.php2,104 ▲42.02 ▲0.0133.88 ▼2.9835.41 ▲1.83
Add New Post /wp-admin/post-new.php1,529 ▼023.59 ▲0.49676.43 ▲69.4362.75 ▲13.73
Media Library /wp-admin/upload.php1,401 ▲14.18 ▲0.06103.04 ▼9.4745.20 ▼3.41
Keep Sabbath /wp-admin/options-general.php?page=keepsabbath8671.9925.3631.78

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie WordPress options were found after uninstall: 11 options
    • keepsabbath_setting_pages_to_redirect
    • keepsabbath_setting_holy_day_dates
    • widget_theysaidso_widget
    • widget_recent-comments
    • keepsabbath_setting_longitude
    • can_compress_scripts
    • db_upgraded
    • keepsabbath_setting_redirect_to_page
    • widget_recent-posts
    • theysaidso_admin_options
    • ...

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Donate link: Please fix this invalid url: ""
The official readme.txt is a good inspiration

keep-sabbath/keep-sabbath.php 85% from 13 tests

"Keep Sabbath" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Requires at least: Required version must match the one declared in readme.txt ("3.0.1" instead of "5.2")
  • Domain Path: The domain path is invalid: folder "/languages" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin400 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP4105420400

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity10.00
▷ Minimum class complexity7.00
▷ Maximum class complexity12.00
Average method complexity1.73
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods37
▷ Static methods12.70%
▷ Public methods3389.19%
▷ Protected methods00.00%
▷ Private methods410.81%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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