10% lord-linus-business-hours

Code Review | Lord Linus Business hours

WordPress plugin Lord Linus Business hours scored10%from 54 tests.

About plugin

  • Plugin page: lord-linus-busine...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0.2+
  • WordPress version: 6.3.1
  • First release: May 15, 2013
  • Latest release: Aug 16, 2013
  • Number of updates: 4
  • Update frequency: every 23.3 days
  • Top authors: lordlinus (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,006 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The following installer errors require your attention
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/lord-linus-business-hours/lordlinus-business-hours.php+449
    Methods with the same name as their class will not be constructors in a future version of PHP; lordlinus_businesshour has a deprecated constructor

Server metrics [RAM: ▼1.71MB] [CPU: ▼47.37ms] Passed 4 tests

A check of server-side resources used by Lord Linus Business hours
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.28 ▼1.188.69 ▼35.42
Dashboard /wp-admin2.29 ▼1.0111.87 ▼40.75
Posts /wp-admin/edit.php2.29 ▼1.0610.93 ▼36.41
Add New Post /wp-admin/post-new.php2.29 ▼3.599.88 ▼76.90
Media Library /wp-admin/upload.php2.29 ▼0.9411.06 ▼23.30

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_lordlinus_businesshour
db_upgraded
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Lord Linus Business hours
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,823 ▲8813.18 ▼1.191.72 ▼0.4050.00 ▲2.51
Dashboard /wp-admin2,213 ▲285.81 ▼0.04100.78 ▼2.9646.61 ▲3.34
Posts /wp-admin/edit.php2,111 ▲251.97 ▼0.0939.04 ▲2.5736.72 ▲1.98
Add New Post /wp-admin/post-new.php1,366 ▼17616.73 ▼1.55582.30 ▼62.6154.38 ▼1.46
Media Library /wp-admin/upload.php1,407 ▲164.25 ▲0.0495.86 ▼2.7642.75 ▼1.44

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin did not uninstall without warnings or errors
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in lordlinus_businesshour is deprecated since version 4.3.0! Use __construct() instead.
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_lordlinus_businesshour

Smoke tests 75% from 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)
Good news, no errors were detected

SRP 50% from 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
Please take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/lord-linus-business-hours/lordlinus-business-hours.php:443

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Plugin Name: You should set the name of your plugin on the first line ( === lord-linus-business-hours === )
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Contact Us Form on a page), #2 (Entries into admin dashboard)
Please take inspiration from this readme.txt

lord-linus-business-hours/lordlinus-business-hours.php 92% from 13 tests

The primary PHP file in "Lord Linus Business hours" version 1.1 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("lord-linus-business-hours.php" instead of "lordlinus-business-hours.php")

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
Success! There were no dangerous files found in this plugin5,278 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
CSS1891394,695
PHP14517497
JavaScript15786

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity3.25
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin