68% business-open-hours-master

Code Review | Business Open Hours Master

WordPress plugin Business Open Hours Master scored 68% from 54 tests.

About plugin

  • Plugin page: business-open-hou...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-4.3
  • WordPress version: 6.3.1
  • First release: Sep 9, 2015
  • Latest release: Sep 9, 2015
  • Number of updates: 5
  • Update frequency: every 1.6 days
  • Top authors: devcon1 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 2,392 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼5.96ms] Passed 4 tests

A check of server-side resources used by Business Open Hours Master
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0741.69 ▼3.07
Dashboard /wp-admin3.38 ▲0.0750.37 ▲0.50
Posts /wp-admin/edit.php3.49 ▲0.1446.80 ▲3.84
Add New Post /wp-admin/post-new.php5.98 ▲0.0986.55 ▼21.19
Media Library /wp-admin/upload.php3.30 ▲0.0737.15 ▼0.06
Business Hours /wp-admin/admin.php?page=bohm_admin_menu3.2932.22
Settings /wp-admin/admin.php?page=bohm_settings_menu3.2631.12

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Business Open Hours Master
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,919 ▲18413.62 ▼0.765.33 ▲3.5142.29 ▼11.02
Dashboard /wp-admin2,227 ▲395.93 ▲1.02104.56 ▼14.1786.08 ▲38.05
Posts /wp-admin/edit.php2,126 ▲342.27 ▲0.2532.57 ▼8.0130.75 ▼7.07
Add New Post /wp-admin/post-new.php6,699 ▲5,16623.88 ▲0.55967.03 ▲328.7737.98 ▼11.66
Media Library /wp-admin/upload.php1,424 ▲364.23 ▼0.03102.17 ▼17.5267.58 ▲16.59
Business Hours /wp-admin/admin.php?page=bohm_admin_menu8641.9529.7825.72
Settings /wp-admin/admin.php?page=bohm_settings_menu8321.9425.5227.32

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
These items require your attention
  • Uninstall procedure had uncaught errors
    • > Notice in wp-includes/option.php+2520
    Undefined index: ch_admin_menu
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/admin.php?page=bohm_admin_menu
    • > Notice in wp-content/plugins/business-open-hours-master/admin/partials/menu-page-bohm-regular-hours.php+15
    Undefined index: action
    • > GET request to /wp-admin/admin.php?page=bohm_settings_menu
    • > Notice in wp-content/plugins/business-open-hours-master/admin/class-business-open-hours-master-admin.php+179
    Undefined variable: options
    • > GET request to /wp-admin/admin.php?page=bohm_settings_menu
    • > Notice in wp-content/plugins/business-open-hours-master/admin/class-business-open-hours-master-admin.php+179
    Trying to access array offset on value of type null

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
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/business-open-hours-master/admin/partials/menu-page-bohm-settings.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/business-open-hours-master/public/partials/display-bohm-public.php:17
    • > PHP Notice
      Undefined index: action in wp-content/plugins/business-open-hours-master/admin/partials/menu-page-bohm-regular-hours.php on line 15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/business-open-hours-master/admin/partials/menu-page-bohm-regular-hours.php:32

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% 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:
  • Screenshots: Please add images for these screenshots: #1 (open-hours.jpg shows how the plugin displays in the WordPress admin area.), #2 (open-hours-2.jpg shows how the plugin displays on the front end of a website with default css.)
You can look at the official readme.txt

business-open-hours-master/business-open-hours-master.php Passed 13 tests

The principal PHP file in "Business Open Hours Master" v. 1.0.0 is loaded by WordPress automatically on each request
96 characters long description:
This is a short description of what the plugin does. It's displayed in the WordPress admin area.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin1,873 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript31962221,205
PHP13127566486
CSS32124182

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity1.71
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.15
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods33
▷ Static methods26.06%
▷ Public methods2781.82%
▷ Protected methods00.00%
▷ Private methods618.18%
Functions8
▷ Named functions8100.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
3 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/assets/admin-icon-big.png4.18KB1.71KB▼ 59.12%
admin/assets/admin-icon.png3.47KB1.25KB▼ 63.93%
admin/assets/grabber.png1.28KB0.48KB▼ 62.62%