83% ts-business-hours

Code Review | TS Business Hours

WordPress plugin TS Business Hours scored 83% from 54 tests.

About plugin

  • Plugin page: ts-business-hours
  • Plugin version: 0.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.8
  • WordPress version: 6.3.1
  • First release: Dec 19, 2013
  • Latest release: Jan 13, 2014
  • Number of updates: 7
  • Update frequency: every 16.9 days
  • Top authors: zackphilipps (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,111 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼4.92ms] Passed 4 tests

This is a short check of server-side resources used by TS Business Hours
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.41 ▼6.04
Dashboard /wp-admin3.32 ▲0.0165.98 ▲15.86
Posts /wp-admin/edit.php3.37 ▲0.0148.06 ▼0.47
Add New Post /wp-admin/post-new.php5.90 ▲0.0188.40 ▼13.80
Media Library /wp-admin/upload.php3.24 ▲0.0136.13 ▲0.65

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for TS Business Hours
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.20 ▼0.181.93 ▲0.2142.96 ▼3.06
Dashboard /wp-admin2,209 ▲185.90 ▼0.0098.44 ▼5.3337.09 ▼2.96
Posts /wp-admin/edit.php2,095 ▲62.02 ▼0.1135.13 ▼1.4236.23 ▲4.03
Add New Post /wp-admin/post-new.php1,534 ▼022.94 ▼0.12620.82 ▼15.4147.13 ▼15.39
Media Library /wp-admin/upload.php1,382 ▼94.44 ▲0.27101.08 ▼1.8340.78 ▼6.13

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 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 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 fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_field() in wp-content/plugins/ts-business-hours/example.php:1

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Donate link: Invalid URI ("")
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === ts-business-hours === )
The official readme.txt might help

ts-business-hours/ts-business-hours.php 92% from 13 tests

The main PHP file in "TS Business Hours" ver. 0.1.1 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 170 characters long)

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
Everything looks great! No dangerous files found in this plugin218 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP3198218

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity13.00
▷ Minimum class complexity13.00
▷ Maximum class complexity13.00
Average method complexity2.09
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin