78% tablebooker

Code Review | tablebooker - The official plugin for tablebooker

WordPress plugin tablebooker - The official plugin for tablebooker scored78%from 54 tests.

About plugin

  • Plugin page: tablebooker
  • Plugin version: 3.1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Nov 30, 2012
  • Latest release: Sep 14, 2023
  • Number of updates: 32
  • Update frequency: every 123.1 days
  • Top authors: johannesdr (100%)

Code review

54 tests

User reviews

1 review

Install metrics

400+ active /3,320 total downloads

Benchmarks

Plugin footprint 83% 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: ▲0.05MB] [CPU: ▼0.90ms] Passed 4 tests

A check of server-side resources used by tablebooker - The official plugin for tablebooker
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0440.53 ▼3.34
Dashboard /wp-admin3.36 ▲0.0650.04 ▼3.30
Posts /wp-admin/edit.php3.47 ▲0.1248.38 ▼1.37
Add New Post /wp-admin/post-new.php5.94 ▲0.0599.38 ▲4.40
Media Library /wp-admin/upload.php3.28 ▲0.0538.05 ▲4.47

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for tablebooker - The official plugin for tablebooker
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,937 ▲16613.56 ▼0.975.79 ▲3.7845.26 ▲4.18
Dashboard /wp-admin2,210 ▲225.85 ▲0.9699.25 ▼23.4642.49 ▼2.03
Posts /wp-admin/edit.php2,096 ▲72.04 ▼0.0241.86 ▼0.0735.65 ▼5.15
Add New Post /wp-admin/post-new.php1,522 ▼1523.18 ▼0.02640.08 ▼35.5453.91 ▼5.62
Media Library /wp-admin/upload.php1,386 ▼24.18 ▼0.1098.69 ▼19.9046.46 ▼6.07
Tablebooker /wp-admin/tablebooker.php260.440.0815.35

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means 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
The following issues need your attention
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/tablebooker/tablebooker.php on line 31
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/tablebooker/adminPage.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/tablebooker/tablebooker.php:40

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There are user-side issues you should fix
    • > GET request to /wp-admin/tablebooker.php
    • > Network (severe)
    wp-admin/tablebooker.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
9 plugin tags: dining, booking, food, menu, menus...

tablebooker/tablebooker.php 92% from 13 tests

"tablebooker - The official plugin for tablebooker" version 3.1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist

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

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity14.00
▷ Minimum class complexity12.00
▷ Maximum class complexity16.00
Average method complexity2.37
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods19
▷ Static methods00.00%
▷ Public methods1894.74%
▷ Protected methods00.00%
▷ Private methods15.26%
Functions11
▷ Named functions11100.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
No PNG files were detected