84% freetobook-responsive-widget

Code Review | Freetobook Responsive Widget

WordPress plugin Freetobook Responsive Widget scored84%from 54 tests.

About plugin

  • Plugin page: freetobook-respon...
  • Plugin version: 1.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.9.3
  • WordPress version: 6.3.1
  • First release: Oct 4, 2021
  • Latest release: Dec 6, 2022
  • Number of updates: 6
  • Update frequency: every 71.8 days
  • Top authors: freetobook (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

400+ active /1,719 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.03MB] [CPU: ▼5.16ms] Passed 4 tests

A check of server-side resources used by Freetobook Responsive Widget
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0337.45 ▼1.40
Dashboard /wp-admin3.34 ▲0.0349.16 ▼2.37
Posts /wp-admin/edit.php3.39 ▲0.0345.63 ▼3.63
Add New Post /wp-admin/post-new.php5.92 ▲0.0384.46 ▼12.06
Media Library /wp-admin/upload.php3.26 ▲0.0334.10 ▼2.56
Freetobook Responsive Widget /wp-admin/options-general.php?page=freetobook-responsive-widget/includes/ftb-widget-admin-settings.php3.2330.71

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options
widget_ftb_widget
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Freetobook Responsive Widget
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,927 ▲19214.71 ▲0.3221.28 ▲19.5938.85 ▼4.16
Dashboard /wp-admin2,210 ▲255.82 ▲0.94109.22 ▲4.0239.62 ▼5.28
Posts /wp-admin/edit.php2,093 ▲42.02 ▲0.0235.15 ▼3.7232.38 ▼2.73
Add New Post /wp-admin/post-new.php1,537 ▲2323.24 ▲5.72697.02 ▲25.5158.79 ▲4.82
Media Library /wp-admin/upload.php1,392 ▲44.18 ▼0.03100.83 ▼17.1844.09 ▼0.01
Freetobook Responsive Widget /wp-admin/options-general.php?page=freetobook-responsive-widget/includes/ftb-widget-admin-settings.php8152.0228.7225.06

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_ftb_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

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
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/freetobook-responsive-widget/includes/ftb-widget.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
7 plugin tags: online booking, pms, web booking, booking button, booking engine...

freetobook-responsive-widget/freetobook-responsive-widget.php Passed 13 tests

"Freetobook Responsive Widget" version 1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
56 characters long description:
Add freetobook responsive widget to your wordpress site.

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

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity6.00
▷ Minimum class complexity1.00
▷ Maximum class complexity11.00
Average method complexity2.11
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods666.67%
▷ Protected methods00.00%
▷ Private methods333.33%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
PNG images were not found in this plugin