89% easy-business-hours

Code Review | Easy Business Hours

WordPress plugin Easy Business Hours scored89%from 54 tests.

About plugin

  • Plugin page: easy-business-hours
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.1.1
  • WordPress version: 6.3.1
  • First release: Dec 11, 2022
  • Latest release: Dec 11, 2022
  • Number of updates: 2
  • Update frequency: every 1.0 days
  • Top authors: kazimahmud (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /168 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.15MB] [CPU: ▼8.76ms] Passed 4 tests

An overview of server-side resources used by Easy Business Hours
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1633.09 ▼8.65
Dashboard /wp-admin3.47 ▲0.1244.47 ▼17.40
Posts /wp-admin/edit.php3.58 ▲0.2247.08 ▲0.55
Add New Post /wp-admin/post-new.php6.05 ▲0.1682.10 ▼9.55
Media Library /wp-admin/upload.php3.39 ▲0.1645.30 ▲9.13
Codestar Framework /wp-admin/tools.php?page=csf-welcome3.4437.14

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 132 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
easy_business_hours
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Easy Business Hours
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,890 ▲14413.58 ▲0.332.07 ▼1.9336.89 ▼9.13
Dashboard /wp-admin2,254 ▲665.83 ▲0.9597.78 ▼16.2440.62 ▼0.86
Posts /wp-admin/edit.php2,134 ▲452.01 ▼0.0139.92 ▲0.0133.66 ▼2.35
Add New Post /wp-admin/post-new.php1,569 ▲3622.93 ▼0.09680.57 ▲19.9670.64 ▲16.76
Media Library /wp-admin/upload.php1,433 ▲484.20 ▼0.01117.80 ▲15.9953.51 ▲10.10
Codestar Framework /wp-admin/tools.php?page=csf-welcome1,4553.6748.0261.59
Settings /wp-admin/admin.php?page=easy-business-hours#tab=settings2,6204.60100.8336.27
Shortcode /wp-admin/admin.php?page=easy-business-hours#tab=shortcode1,4943.7556.9134.76

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • easy_business_hours
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

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)
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention: The official readme.txt might help

easy-business-hours/easy-business-hours.php 85% from 13 tests

The primary PHP file in "Easy Business Hours" version 1.0.1 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Domain Path: The domain path is invalid: folder "/languages" does not exist
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

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
Good job! No executable or dangerous file extensions detected16,943 lines of code in 101 files:
LanguageFilesBlank linesComment linesLines of code
PHP722,2621,01410,029
PO File203,1983,5916,500
Markdown2850379
CSS39031
JavaScript2022
SVG2002

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.63
Average class complexity20.82
▷ Minimum class complexity1.00
▷ Maximum class complexity151.00
Average method complexity6.83
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes55
▷ Abstract classes23.64%
▷ Concrete classes5396.36%
▷ Final classes11.89%
Methods187
▷ Static methods3116.58%
▷ Public methods187100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions21
▷ Named functions21100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
3 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/icon-256x256.png6.62KB3.21KB▼ 51.47%
inc/codestar-framework-master/assets/images/checkerboard.png2.29KB2.54KB0.00%
assets/img/icon-128x128.png3.76KB1.92KB▼ 49.05%