78% viking-bookings

Code Review | Viking Bookings

WordPress plugin Viking Bookings scored78%from 54 tests.

About plugin

  • Plugin page: viking-bookings
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.6
  • WordPress version: 6.3.1
  • First release: Jan 11, 2021
  • Latest release: Jan 19, 2021
  • Number of updates: 4
  • Update frequency: every 2.8 days
  • Top authors: vikingbookings (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /653 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼6.79ms] Passed 4 tests

A check of server-side resources used by Viking Bookings
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0540.49 ▼2.11
Dashboard /wp-admin3.41 ▲0.0250.86 ▼12.84
Posts /wp-admin/edit.php3.52 ▲0.1256.16 ▲3.84
Add New Post /wp-admin/post-new.php6.01 ▲0.0891.10 ▼13.75
Media Library /wp-admin/upload.php3.33 ▲0.0636.43 ▲1.53
Viking Bookings /wp-admin/options-general.php?page=vikingbookings3.3036.36

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
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
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Viking Bookings
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,924 ▲13814.99 ▲0.6411.07 ▲9.1741.03 ▼1.01
Dashboard /wp-admin2,218 ▲415.76 ▲0.1887.40 ▼1.8937.51 ▼5.02
Posts /wp-admin/edit.php2,125 ▲252.30 ▲0.2240.91 ▲3.1035.72 ▲3.73
Add New Post /wp-admin/post-new.php6,244 ▲4,71826.27 ▲2.67936.06 ▲224.5742.49 ▼20.60
Media Library /wp-admin/upload.php1,420 ▲204.44 ▲0.27103.19 ▼2.5542.39 ▼6.01
Viking Bookings /wp-admin/options-general.php?page=vikingbookings1,0052.5541.6628.63

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
  • 11 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=vikingbookings
    • > POST request to /wp-cron.php?doing_wp_cron=1697551793.8827230930328369140625
    • > Warning in wp-content/plugins/easy-age-verifier/lib/extras/wpApi.php+48
    file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known
  • 11 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=vikingbookings
    • > POST request to /wp-cron.php?doing_wp_cron=1697551793.8827230930328369140625
    • > Warning in wp-content/plugins/easy-age-verifier/lib/extras/wpApi.php+48
    file_get_contents(http://www.fillyourtaproom.com/wp-json/wp/v2/posts?per_page=10): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known

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
Almost there! Just fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/viking-bookings/viking-bookings.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

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
These attributes need to be fixed:
  • Contributors: Plugin contributors field is missing
  • Tags: You are using too many tags: 13 tag instead of maximum 10
The official readme.txt might help

viking-bookings/viking-bookings.php 92% from 13 tests

The principal PHP file in "Viking Bookings" v. 1.0.1 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Domain Path: The domain path folder does not exist ("/languages")

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
No dangerous file extensions were detected162 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP22923159
JavaScript1003

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity22.00
▷ Minimum class complexity22.00
▷ Maximum class complexity22.00
Average method complexity2.17
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods18
▷ Static methods00.00%
▷ Public methods18100.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

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected