88% bike-rental-manager-calendar

Code Review | Bike Rental Online Booking Calendar

WordPress plugin Bike Rental Online Booking Calendar scored 88% from 54 tests.

About plugin

  • Plugin page: bike-rental-manag...
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.4.1
  • WordPress version: 5.8.1
  • First release: Aug 14, 2018
  • Latest release: Jun 23, 2020
  • Number of updates: 9
  • Update frequency: every 76.6 days
  • Top authors: bikerentalmanager (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 1,038 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼141.20ms] Passed 4 tests

Analyzing server-side resources used by Bike Rental Online Booking Calendar
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.1335.11 ▲12.44
Dashboard /wp-admin3.07 ▲0.0248.91 ▲2.69
Posts /wp-admin/edit.php3.13 ▲0.0248.28 ▲3.25
Add New Post /wp-admin/post-new.php5.44 ▲0.0193.95 ▼555.44
Media Library /wp-admin/upload.php3.02 ▲0.0131.47 ▼15.28

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 6 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Bike Rental Online Booking Calendar
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲10715.94 ▲0.3512.63 ▲1.5550.83 ▼2.19
Dashboard /wp-admin2,970 ▲405.91 ▼0.06145.01 ▼18.92103.52 ▼9.80
Posts /wp-admin/edit.php2,739 ▼02.72 ▲0.0066.25 ▼0.1684.26 ▼8.53
Add New Post /wp-admin/post-new.php1,683 ▼1,85518.86 ▲4.07400.02 ▼126.78105.87 ▼10.85
Media Library /wp-admin/upload.php1,807 ▼05.00 ▼0.05154.56 ▲2.38125.44 ▲6.26

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
Please fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/bike-rental-manager-calendar/bike-rental-manager.php
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function BikeRentalManager\\Calendar\\Templates\\pll_current_language() in wp-content/plugins/bike-rental-manager-calendar/templates/iframe-shop-2.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function BikeRentalManager\\Calendar\\Templates\\esc_url() in wp-content/plugins/bike-rental-manager-calendar/templates/iframe-shop.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
10 plugin tags: shuttle tickets reservation, availability calendar, reservation system, ski rental, calendar...

bike-rental-manager-calendar/bike-rental-manager.php 85% from 13 tests

The main PHP file in "Bike Rental Online Booking Calendar" ver. 1.0.2 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("bike-rental-manager-calendar.php" instead of "bike-rental-manager.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 339 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin95 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP4257193
Markdown1102

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.14
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
Namespaces2
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%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected