73% totally-booked

Code Review | Totally Booked

WordPress plugin Totally Booked scored73%from 54 tests.

About plugin

  • Plugin page: totally-booked
  • Plugin version: 0.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.0
  • WordPress version: 6.3.1
  • First release: Apr 20, 2013
  • Latest release: Sep 1, 2014
  • Number of updates: 26
  • Update frequency: every 19.2 days
  • Top authors: casben79 (100%)

Code review

54 tests

User reviews

16 reviews

Install metrics

100+ active /10,228 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.12MB] [CPU: ▼4.17ms] Passed 4 tests

An overview of server-side resources used by Totally Booked
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1238.55 ▲1.02
Dashboard /wp-admin3.44 ▲0.1048.60 ▼2.75
Posts /wp-admin/edit.php3.49 ▲0.1447.04 ▼0.86
Add New Post /wp-admin/post-new.php6.02 ▲0.1483.39 ▼14.07
Media Library /wp-admin/upload.php3.36 ▲0.1338.94 ▲5.10
View All Books /wp-admin/edit.php?post_type=tb_book3.4137.42
Add New Book /wp-admin/post-new.php?post_type=tb_book3.3335.53
Your Book Genres /wp-admin/edit-tags.php?taxonomy=tb_genre&post_type=tb_book3.3534.81
Update Settings /wp-admin/edit.php?post_type=tb_book&page=tb_settings3.3633.79
Your Book Authors /wp-admin/edit-tags.php?taxonomy=tb_author&post_type=tb_book3.3533.43
Your Book Series /wp-admin/edit-tags.php?taxonomy=tb_series&post_type=tb_book3.3534.25

Server storage [IO: ▲0.23MB] [DB: ▲0.07MB] Passed 3 tests

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 48 new files
Database: no new tables, 9 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
tb_output_css
tb_output_js
widget_tb_book_widget
widget_recent-posts
db_upgraded
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Totally Booked
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,946 ▲20014.05 ▼0.346.67 ▲5.0944.16 ▲4.09
Dashboard /wp-admin2,235 ▲464.88 ▼0.09106.96 ▼14.9578.77 ▲32.87
Posts /wp-admin/edit.php2,130 ▲412.01 ▲0.0234.21 ▼9.0731.89 ▼7.90
Add New Post /wp-admin/post-new.php1,556 ▲2823.15 ▲4.89777.96 ▲181.5555.89 ▲2.46
Media Library /wp-admin/upload.php1,423 ▲324.20 ▼0.0396.43 ▼3.5080.35 ▲35.04
View All Books /wp-admin/edit.php?post_type=tb_book1,1031.9932.0929.56
Add New Book /wp-admin/post-new.php?post_type=tb_book2,8627.83180.53132.82
Your Book Genres /wp-admin/edit-tags.php?taxonomy=tb_genre&post_type=tb_book1,3172.1425.5129.25
Update Settings /wp-admin/edit.php?post_type=tb_book&page=tb_settings8892.2024.0926.20
Your Book Authors /wp-admin/edit-tags.php?taxonomy=tb_author&post_type=tb_book1,3062.1427.6929.20
Your Book Series /wp-admin/edit-tags.php?taxonomy=tb_series&post_type=tb_book1,3172.1326.5530.33

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_tb_book_widget
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=tb_book
    • > Deprecated in wp-content/plugins/totally-booked/lib/post_types.php+212
    Function create_function() is deprecated

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/totally-booked/templates/parts/wrapper_end.php
    • > /wp-content/plugins/totally-booked/templates/parts/wrapper_start.php
  • 19× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/totally-booked/templates/single/book.php:9
    • > PHP Warning
      Use of undefined constant TB_URI - assumed 'TB_URI' (this will throw an Error in a future version of PHP) in wp-content/plugins/totally-booked/lib/admin_templates/options.php on line 13
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_book_link_meta_details() on null in wp-content/plugins/totally-booked/lib/admin_templates/meta/book_links.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/totally-booked/lib/admin_templates/options.php:19
    • > PHP Notice
      Undefined index: TotallyBooked in wp-content/plugins/totally-booked/lib/admin_templates/meta/book_links.php on line 12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/totally-booked/lib/admin_templates/meta/extra_links.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/totally-booked/lib/widgets.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/totally-booked/templates/buynow_popup.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/totally-booked/lib/admin_templates/pages/advanced.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/totally-booked/lib/admin_templates/meta/book_details.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Tags: You are using too many tags: 19 tag instead of maximum 10
The official readme.txt is a good inspiration

totally-booked/totally-booked.php Passed 13 tests

This is the main PHP file of "Totally Booked" version 0.6, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
105 characters long description:
A plugin to help authors and book affiliates list their books quickly and easily in any WordPress website

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin2,274 lines of code in 30 files:
LanguageFilesBlank linesComment linesLines of code
PHP245976121,253
PO File1161169576
CSS35723326
JavaScript27235119

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity15.00
▷ Minimum class complexity8.00
▷ Maximum class complexity26.00
Average method complexity2.65
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods51
▷ Static methods35.88%
▷ Public methods51100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/menu_icon.png1.08KB0.18KB▼ 83.75%
assets/images/close_icon.png1.58KB0.45KB▼ 71.33%