78% vr-calendar

Code Review | Vacation Rental Calendar

WordPress plugin Vacation Rental Calendar scored78%from 54 tests.

About plugin

  • Plugin page: vr-calendar
  • Plugin version: 1.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.1
  • WordPress version: 6.3.1
  • First release: Apr 16, 2015
  • Latest release: Jul 3, 2016
  • Number of updates: 24
  • Update frequency: every 18.5 days
  • Top authors: duanestrong (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

80+ active /3,742 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

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

Analyzing server-side resources used by Vacation Rental Calendar
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0236.21 ▼0.60
Dashboard /wp-admin3.33 ▼0.0144.23 ▼16.14
Posts /wp-admin/edit.php3.38 ▲0.0347.85 ▲3.66
Add New Post /wp-admin/post-new.php5.91 ▲0.0280.16 ▼11.82
Media Library /wp-admin/upload.php3.25 ▲0.0235.84 ▲0.19
VR Calendar /wp-admin/options-general.php?page=vr_calendar3.2031.49

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Vacation Rental Calendar
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.72 ▲0.151.58 ▼0.0040.83 ▼1.59
Dashboard /wp-admin2,199 ▲225.64 ▼0.0384.66 ▼3.4435.44 ▼4.21
Posts /wp-admin/edit.php2,104 ▲11.99 ▼0.0236.25 ▼0.5831.05 ▼4.07
Add New Post /wp-admin/post-new.php1,540 ▲1218.27 ▼4.78596.32 ▼1.0485.74 ▲32.38
Media Library /wp-admin/upload.php1,404 ▲44.24 ▲0.0197.51 ▼8.9944.14 ▲2.19
VR Calendar /wp-admin/options-general.php?page=vr_calendar8311.9922.7927.91

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Please fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=vr_calendar
    • > Notice in wp-content/plugins/vr-calendar/php/admin-page.php+88
    Trying to access array offset on value of type bool

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 3× 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/vr-calendar/php/admin-page.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/vr-calendar/php/admin-page.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/vr-calendar/php/shortcodes.php:5

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)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === vr-calendar === )
  • Screenshots: Add images for these screenshots: #1 (screenshot-1.png), #2 (screenshot-2.png), #3 (screenshot-3.png)
The official readme.txt is a good inspiration

vr-calendar/vr-calendar.php Passed 13 tests

This is the main PHP file of "Vacation Rental Calendar" version 1.2.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
68 characters long description:
Shortcode for displaying a vacation rental calendar via an iCal feed

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
No dangerous file extensions were detected689 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript310850416
PHP45166231
CSS30042

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity13.00
▷ Minimum class complexity13.00
▷ Maximum class complexity13.00
Average method complexity5.00
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.12MB with 0.08MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png23.50KB8.83KB▼ 62.43%
screenshot-3.png66.49KB23.82KB▼ 64.17%
screenshot-1.png36.37KB15.46KB▼ 57.48%