84% show-dobu-uk-availability

Code Review | DoBu.uk Availability

WordPress plugin DoBu.uk Availability scored84%from 54 tests.

About plugin

  • Plugin page: show-dobu-uk-avai...
  • Plugin version: 1.1.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.1
  • WordPress version: 6.3.1
  • First release: Nov 18, 2022
  • Latest release: Nov 25, 2022
  • Number of updates: 7
  • Update frequency: every 1.4 days
  • Top authors: richiejp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /867 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.01MB] [CPU: ▼2.14ms] Passed 4 tests

Server-side resources used by DoBu.uk Availability
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.71 ▼1.37
Dashboard /wp-admin3.31 ▲0.0146.95 ▲3.11
Posts /wp-admin/edit.php3.36 ▲0.0147.78 ▼2.63
Add New Post /wp-admin/post-new.php5.90 ▲0.0185.27 ▼6.05
Media Library /wp-admin/upload.php3.24 ▲0.0134.74 ▲1.51

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-posts
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for DoBu.uk Availability
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,803 ▲6813.16 ▼1.221.69 ▼0.0943.83 ▼7.27
Dashboard /wp-admin2,209 ▲184.84 ▼1.04102.04 ▼8.1942.13 ▼1.54
Posts /wp-admin/edit.php2,089 ▲32.02 ▼0.1433.76 ▼2.6933.35 ▲1.26
Add New Post /wp-admin/post-new.php6,417 ▲4,90328.25 ▲10.64868.96 ▲197.1960.68 ▲7.35
Media Library /wp-admin/upload.php1,388 ▲34.36 ▲0.1895.08 ▼4.5839.74 ▼3.42

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • 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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/show-dobu-uk-availability/dobuuk-availability.php:28

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: block, calendar, availability, booking, embed

show-dobu-uk-availability/dobuuk-availability.php 85% from 13 tests

"DoBu.uk Availability" version 1.1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("show-dobu-uk-availability.php" instead of "dobuuk-availability.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

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 plugin38 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
JSON10029
PHP21226
CSS2002
JavaScript1001

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.00
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.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
PNG images were not found in this plugin