83% planfy-online-booking

Code Review | Planfy Online Booking

WordPress plugin Planfy Online Booking scored83%from 54 tests.

About plugin

  • Plugin page: planfy-online-boo...
  • Plugin version: 0.1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.8.1
  • WordPress version: 6.3.1
  • First release: Jan 28, 2017
  • Latest release: Apr 5, 2023
  • Number of updates: 13
  • Update frequency: every 173.5 days
  • Top authors: liamonade (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /714 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.06MB] [CPU: ▼4.64ms] Passed 4 tests

Server-side resources used by Planfy Online Booking
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0641.16 ▼3.40
Dashboard /wp-admin3.36 ▲0.0648.82 ▼5.45
Posts /wp-admin/edit.php3.48 ▲0.1253.51 ▲1.30
Add New Post /wp-admin/post-new.php5.96 ▲0.0795.93 ▼9.72
Media Library /wp-admin/upload.php3.29 ▲0.0538.24 ▼0.00

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 39 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

Planfy Online Booking: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,913 ▲15213.87 ▼0.288.91 ▲7.2541.52 ▼4.99
Dashboard /wp-admin2,208 ▲285.55 ▼0.0689.00 ▼3.2139.12 ▼4.76
Posts /wp-admin/edit.php2,116 ▲161.98 ▼0.0538.87 ▲0.8236.17 ▲2.12
Add New Post /wp-admin/post-new.php1,540 ▲922.97 ▼0.21670.44 ▲6.4752.79 ▲3.26
Media Library /wp-admin/upload.php1,419 ▲254.15 ▼0.0594.58 ▼11.2443.31 ▼0.41

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
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
The following issues need your attention
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/planfy-online-booking/admin/partials/installed.php:30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/planfy-online-booking/public/partials/widget.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/planfy-online-booking/admin/partials/install.php:41

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 90% 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
Please fix the following attributes:
  • Contributors: Contributors not specified
You can look at the official readme.txt

planfy-online-booking/planfy.php 85% from 13 tests

This is the main PHP file of "Planfy Online Booking" version 0.1.5, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("planfy-online-booking.php" instead of "planfy.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected350 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP13140524231
PO File3151584
JavaScript2105425
CSS23810

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.06
Average class complexity1.43
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.10
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods29
▷ Static methods26.90%
▷ Public methods2482.76%
▷ Protected methods00.00%
▷ Private methods517.24%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
4 PNG files occupy 0.72MB with 0.35MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/banner-772x250.png161.57KB84.27KB▼ 47.84%
assets/banner-1544x500.png549.64KB314.78KB▼ 42.73%
assets/icon-256x256.png17.88KB7.88KB▼ 55.92%
assets/icon-128x128.png7.69KB4.14KB▼ 46.17%