90% mage-support-online

Code Review | Business Hours With Online/Offline Status

WordPress plugin Business Hours With Online/Offline Status scored90%from 54 tests.

About plugin

  • Plugin page: mage-support-online
  • Plugin version: 1.0.4
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.2
  • WordPress version: 6.3.1
  • First release: Jul 26, 2019
  • Latest release: Aug 19, 2019
  • Number of updates: 12
  • Update frequency: every 2.0 days
  • Top authors: magepeopleteam (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /757 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
Install script ran successfully

Server metrics [RAM: ▲0.24MB] [CPU: ▼0.68ms] Passed 4 tests

A check of server-side resources used by Business Hours With Online/Offline Status
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1942.24 ▼5.88
Dashboard /wp-admin3.63 ▲0.3255.14 ▲3.83
Posts /wp-admin/edit.php3.68 ▲0.3154.64 ▼3.21
Add New Post /wp-admin/post-new.php6.14 ▲0.2595.35 ▲2.52
Media Library /wp-admin/upload.php3.46 ▲0.2343.73 ▲9.30
Support Online /wp-admin/options-general.php?page=mage-plugin_settings_page3.4640.52

Server storage [IO: ▲0.16MB] [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: 37 new files
Database: no new tables, 8 new options
New WordPress options
general_setting_sec
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-posts
general_setting_section_timepicker

Browser metrics Passed 4 tests

This is an overview of browser requirements for Business Hours With Online/Offline Status
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,962 ▲20114.74 ▲0.352.45 ▲0.4040.98 ▼6.19
Dashboard /wp-admin2,364 ▲1876.41 ▲0.73117.04 ▲24.6543.17 ▲3.68
Posts /wp-admin/edit.php2,289 ▲1893.69 ▲1.6957.37 ▲15.2535.84 ▼3.28
Add New Post /wp-admin/post-new.php1,551 ▲623.44 ▲0.26637.77 ▼15.5039.19 ▼35.45
Media Library /wp-admin/upload.php1,426 ▲264.32 ▲0.1089.35 ▼14.3742.15 ▼0.86
Support Online /wp-admin/options-general.php?page=mage-plugin_settings_page2,1544.85101.8225.18

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

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

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 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Everything seems fine, however this is by no means an exhaustive test

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 issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Please add descriptions for these screenshots #1, #2, #3, #4, #5, #6 in mage-support-online/assets to your readme.txt
You can take inspiration from this readme.txt

mage-support-online/mage-support-online.php Passed 13 tests

The main file in "Business Hours With Online/Offline Status" v. 1.0.4 serves as a complement to information provided in readme.txt and as the entry point to the plugin
110 characters long description:
This plugin will show your online status like active and deactive. and when support will be offline or online.

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 detected1,812 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP14309394987
JavaScript4125148664
CSS52254144
Markdown16017

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity9.00
▷ Minimum class complexity1.00
▷ Maximum class complexity73.00
Average method complexity1.97
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods70
▷ Static methods34.29%
▷ Public methods6694.29%
▷ Protected methods00.00%
▷ Private methods45.71%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants3
▷ Global constants3100.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 were not PNG files found in your plugin