62% vrpconnector

Code Review | VRPConnector

WordPress plugin VRPConnector scored62%from 54 tests.

About plugin

  • Plugin page: vrpconnector
  • Plugin version: 2.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.0
  • WordPress version: 6.3.1
  • First release: Feb 20, 2015
  • Latest release: Dec 4, 2019
  • Number of updates: 137
  • Update frequency: every 12.8 days
  • Top authors: Houghtelin (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

200+ active /3,677 total downloads

Benchmarks

Plugin footprint 65% 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: ▼1.30MB] [CPU: ▼40.10ms] Passed 4 tests

An overview of server-side resources used by VRPConnector
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.69 ▼0.777.74 ▼33.01
Dashboard /wp-admin2.71 ▼0.59392.15 ▲337.42
Posts /wp-admin/edit.php2.71 ▼0.6510.30 ▼39.19
Add New Post /wp-admin/post-new.php2.71 ▼3.1810.11 ▼87.63
Media Library /wp-admin/upload.php2.71 ▼0.5235.64 ▼0.57
VRPConnector /wp-admin/options-general.php?page=VRPConnector2.719.59

Server storage [IO: ▲4.82MB] [DB: ▲0.00MB] 67% from 3 tests

Input-output and database impact of this plugin
Please fix the following
  • You have illegally modified 158 files (4,547.54KB) outside of "wp-content/plugins/vrpconnector/" and "wp-content/uploads/"
    • (new file) wp-content/themes/twentytwentyone/vrp/desertsunrise/css/font-awesome.css
    • (new file) wp-content/themes/twentytwentyone/vrp/default_functions.php
    • (new file) wp-content/themes/twentytwentyone/vrp/desertsunrise/css/booking.custom.css
    • (new file) wp-content/themes/twentytwentyone/vrp/desertsunrise/complex.php
    • (new file) wp-content/themes/twentytwentyone/vrp/desertsunrise/css/css.css
    • (new file) wp-content/themes/twentytwentyone/vrp/desertsunrise/css/bootstrap.min.css
    • (new file) wp-content/themes/twentytwentyone/vrp/desertsunrise/confirm.php
    • (new file) wp-content/themes/twentytwentyone/vrp/desertsunrise/booking.php
    • (new file) wp-content/themes/twentytwentyone/vrp/desertsunrise/css/jquery-ui-1.12.1.custom/AUTHORS.txt
    • (new file) wp-content/themes/twentytwentyone/vrp/desertsunrise/css/jquery-ui-1.12.1.custom/LICENSE.txt
    • ...
Filesystem: 347 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_vrpsearch_widget
widget_recent-posts
widget_recent-comments
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for VRPConnector
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,940 ▲17915.88 ▲1.2357.48 ▲55.4050.11 ▲4.88
Dashboard /wp-admin2,205 ▲255.55 ▼0.0684.83 ▼11.9842.46 ▼0.77
Posts /wp-admin/edit.php2,110 ▲72.01 ▲0.0340.71 ▲2.1937.96 ▲2.64
Add New Post /wp-admin/post-new.php1,551 ▲2324.31 ▲1.34616.21 ▼37.5470.29 ▲13.11
Media Library /wp-admin/upload.php1,413 ▲134.19 ▼0.07107.49 ▲2.8143.78 ▼4.46
VRPConnector /wp-admin/options-general.php?page=VRPConnector9262.0121.7244.47

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > Warning in wp-content/plugins/vrpconnector/lib/VRPConnector.php+347
    mkdir(): File exists
  • Zombie WordPress options detected upon uninstall: 7 options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_vrpsearch_widget
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These server-side errors were triggered
  • 19 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=VRPConnector
    • > Warning in wp-content/plugins/vrpconnector/lib/VRPConnector.php+347
    mkdir(): File exists
    • > GET request to /wp-admin/options-general.php?page=VRPConnector
    • > Warning in wp-content/plugins/vrpconnector/views/settings.php+53
    Creating default object from empty value

SRP 0% 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 fix the following items
  • 18× PHP files perform the task of outputting text when accessed with GET requests (only 10 are shown):
    • > /wp-content/plugins/vrpconnector/themes/mountainsunset/vrpShort.php
    • > /wp-content/plugins/vrpconnector/lib/xml.php
    • > /wp-content/plugins/vrpconnector/themes/desertsunrise/vrpComplexes.php
    • > /wp-content/plugins/vrpconnector/themes/desertsunrise/ratebreakdown.php
    • > /wp-content/plugins/vrpconnector/themes/desertsunrise/booking.php
    • > /wp-content/plugins/vrpconnector/themes/mountainsunset/special.php
    • > /wp-content/plugins/vrpconnector/themes/mountainsunset/specials.php
    • > /wp-content/plugins/vrpconnector/themes/mountainsunset/booking.php
    • > /wp-content/plugins/vrpconnector/themes/mountainsunset/vrpSpecials.php
    • > /wp-content/plugins/vrpconnector/themes/desertsunrise/special.php
  • 187× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/vrpconnector/themes/desertsunrise/vrpCheckUnitAvailabilityForm.php on line 13
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-content/plugins/vrpconnector/vendor/eluceo/ical/examples/../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/vrpconnector/vendor/eluceo/ical/examples/example1.php on line 4
    • > PHP Warning
      include(): Failed opening 'Parsedown.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/vrpconnector/vendor/erusev/parsedown/test/bootstrap.php on line 3
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/vrpconnector/themes/desertsunrise/vrpFeaturedUnit.php on line 11
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/vrpconnector/vendor/erusev/parsedown/test/CommonMarkTest.php:11
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-content/plugins/vrpconnector/vendor/eluceo/ical/examples/../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/vrpconnector/vendor/eluceo/ical/examples/example5.php on line 9
    • > PHP Fatal error
      Uncaught Error: Class 'Eluceo\\iCal\\Component' not found in wp-content/plugins/vrpconnector/vendor/eluceo/ical/src/Eluceo/iCal/Component/Calendar.php:17
    • > PHP Notice
      Undefined variable: _SESSION in wp-content/plugins/vrpconnector/themes/desertsunrise/results.php on line 16
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/vrpconnector/themes/desertsunrise/results.php on line 16
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/vrpconnector/themes/desertsunrise/special.php on line 9

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Plugin Name: You should set the name of your plugin on the first line ( === vrpconnector === )
The official readme.txt is a good inspiration

vrpconnector/VRPConnector.php 92% from 13 tests

The principal PHP file in "VRPConnector" v. 2.0.1 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("vrpconnector.php" instead of "VRPConnector.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin63,650 lines of code in 262 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript219,4677,28041,311
PHP1032,7812,88910,848
CSS185864528,948
HTML52184341,247
SVG100565
Markdown562050447
JSON660213
YAML38045
XML21026

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity17.83
▷ Minimum class complexity1.00
▷ Maximum class complexity228.00
Average method complexity2.70
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces9
Interfaces1
Traits0
Classes51
▷ Abstract classes11.96%
▷ Concrete classes5098.04%
▷ Final classes00.00%
Methods482
▷ Static methods122.49%
▷ Public methods41385.68%
▷ Protected methods428.71%
▷ Private methods275.60%
Functions43
▷ Named functions2967.44%
▷ Anonymous functions1432.56%
Constants39
▷ Global constants25.13%
▷ Class constants3794.87%
▷ Public constants37100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
34 PNG files occupy 0.18MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
themes/desertsunrise/images/fav.png0.82KB0.81KB▼ 1.90%
themes/desertsunrise/images/cal.png0.22KB0.19KB▼ 14.54%
themes/mountainsunset/images/gslogo.png1.91KB0.89KB▼ 53.45%
themes/mountainsunset/css/jquery-ui-1.11.2.custom/images/ui-bg_flat_75_ffffff_40x100.png0.20KB0.08KB▼ 58.17%
themes/mountainsunset/css/jquery-ui-1.11.2.custom/images/ui-icons_2e83ff_256x240.png4.44KB4.17KB▼ 6.02%