84% fareharbor

Code Review | FareHarbor for WordPress

WordPress plugin FareHarbor for WordPress scored84%from 54 tests.

About plugin

  • Plugin page: fareharbor
  • Plugin version: 3.6.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.2
  • WordPress version: 6.3.1
  • First release: Aug 15, 2014
  • Latest release: Mar 30, 2023
  • Number of updates: 59
  • Update frequency: every 53.4 days
  • Top authors: fareharbor (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

9,000+ active /78,139 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.13MB] [CPU: ▼9.81ms] Passed 4 tests

This is a short check of server-side resources used by FareHarbor for WordPress
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1336.77 ▼8.39
Dashboard /wp-admin3.44 ▲0.1445.99 ▼1.92
Posts /wp-admin/edit.php3.56 ▲0.2044.74 ▼7.25
Add New Post /wp-admin/post-new.php6.02 ▲0.1382.69 ▼21.66
Media Library /wp-admin/upload.php3.37 ▲0.1334.93 ▲2.87
FareHarbor /wp-admin/options-general.php?page=fareharbor/fareharbor.php3.3331.43

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 9 new options
New WordPress options
fareharbor_settings
widget_recent-comments
theysaidso_admin_options
fareharbor_kit_version
widget_recent-posts
widget_theysaidso_widget
fareharbor_version
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for FareHarbor for WordPress
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,563 ▲1,80621.14 ▲6.76204.94 ▲203.0054.46 ▲12.82
Dashboard /wp-admin2,210 ▲255.81 ▼0.0498.22 ▼10.1239.48 ▼0.86
Posts /wp-admin/edit.php2,093 ▲42.01 ▲0.0134.08 ▼7.3434.93 ▼3.28
Add New Post /wp-admin/post-new.php1,551 ▲918.13 ▼0.35608.51 ▼15.7769.22 ▲12.97
Media Library /wp-admin/upload.php1,395 ▲164.20 ▼0.1196.03 ▼5.9442.29 ▼2.65
FareHarbor /wp-admin/options-general.php?page=fareharbor/fareharbor.php9992.0622.3832.27

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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

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 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === fareharbor === )
The official readme.txt is a good inspiration

fareharbor/fareharbor.php Passed 13 tests

The main PHP script in "FareHarbor for WordPress" version 3.6.7 is automatically included on every request by WordPress
68 characters long description:
Easily add FareHarbor reservation calendars and buttons to your site

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
Good job! No executable or dangerous file extensions detected716 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2363122716

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity116.00
▷ Minimum class complexity116.00
▷ Maximum class complexity116.00
Average method complexity3.88
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes1100.00%
Methods40
▷ Static methods3997.50%
▷ Public methods2562.50%
▷ Protected methods00.00%
▷ Private methods1537.50%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin