84% nabooki-booking

Code Review | Nabooki Booking Widgets

WordPress plugin Nabooki Booking Widgets scored84%from 54 tests.

About plugin

  • Plugin page: nabooki-booking
  • Plugin version: 0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.0
  • WordPress version: 6.3.1
  • First release: May 8, 2018
  • Latest release: Dec 12, 2018
  • Number of updates: 5
  • Update frequency: every 44.6 days
  • Top authors: nabooki (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /905 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

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

Analyzing server-side resources used by Nabooki Booking Widgets
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0435.92 ▼0.61
Dashboard /wp-admin3.34 ▼0.0045.49 ▼13.84
Posts /wp-admin/edit.php3.39 ▲0.0443.30 ▼5.69
Add New Post /wp-admin/post-new.php5.94 ▲0.0591.16 ▲4.74
Media Library /wp-admin/upload.php3.26 ▲0.0434.82 ▼2.21
Nabooki /wp-admin/options-general.php?page=nabooki-booking-widgets3.3331.81

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_nabookiwidget
widget_recent-comments
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Nabooki Booking Widgets
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲6013.64 ▼1.005.07 ▲3.4437.10 ▼3.50
Dashboard /wp-admin2,215 ▲244.89 ▲0.0196.20 ▼8.1339.22 ▼1.59
Posts /wp-admin/edit.php2,095 ▲32.03 ▲0.0235.57 ▼4.3631.50 ▼4.31
Add New Post /wp-admin/post-new.php1,533 ▲1923.27 ▲5.49575.78 ▼49.0562.15 ▲3.32
Media Library /wp-admin/upload.php1,388 ▲34.21 ▲0.0796.59 ▼3.9441.02 ▼2.05
Nabooki /wp-admin/options-general.php?page=nabooki-booking-widgets8282.0826.1628.51

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_nabookiwidget
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/nabooki-booking/nabooki-admin.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/nabooki-booking/nabooki.php:12

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:
  • Tags: Please reduce the number of tags, currently 14 tag instead of maximum 10
The official readme.txt is a good inspiration

nabooki-booking/nabooki.php 92% from 13 tests

Analyzing the main PHP file in "Nabooki Booking Widgets" version 0.3
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("nabooki-booking.php" instead of "nabooki.php")

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
Everything looks great! No dangerous files found in this plugin648 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP3182114612
JavaScript115036

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity28.50
▷ Minimum class complexity16.00
▷ Maximum class complexity41.00
Average method complexity3.12
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods26
▷ Static methods00.00%
▷ Public methods623.08%
▷ Protected methods2076.92%
▷ 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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin