77% mybooktable

Code Review | MyBookTable Bookstore by Stormhill Media

WordPress plugin MyBookTable Bookstore by Stormhill Media scored77%from 54 tests.

About plugin

  • Plugin page: mybooktable
  • Plugin version: 3.3.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5.0-6.4.1
  • WordPress version: 6.3.1
  • First release: May 22, 2013
  • Latest release: Nov 29, 2023
  • Number of updates: 111
  • Update frequency: every 35.3 days
  • Top authors: zookatron (78.38%)stormhill (16.22%)authormedia (7.21%)

Code review

54 tests

User reviews

39 reviews

Install metrics

2,000+ active /126,891 total downloads

Benchmarks

Plugin footprint 82% 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: ▲1.83MB] [CPU: ▲3.81ms] 50% from 4 tests

This is a short check of server-side resources used by MyBookTable Bookstore by Stormhill Media
The following require your attention
  • RAM: Total memory usage should be kept under 10MB (currently 24.37MB on /wp-admin/admin.php?page=mbt_dashboard)
  • CPU: You should keep total CPU usage under 500.00ms (currently 1,917.73ms on /wp-admin/admin.php?page=mbt_dashboard)
PageMemory (MB)CPU Time (ms)
Home /5.53 ▲2.0655.76 ▲12.23
Dashboard /wp-admin5.34 ▲2.0460.29 ▲11.18
Posts /wp-admin/edit.php5.38 ▲2.0266.42 ▲19.82
Add New Post /wp-admin/post-new.php7.09 ▲1.2167.19 ▼26.49
Media Library /wp-admin/upload.php5.27 ▲2.0549.26 ▲18.32
Help /wp-admin/admin.php?page=mbt_help5.2753.79
Add Book /wp-admin/post-new.php?post_type=mbt_book5.43102.14
Settings /wp-admin/admin.php?page=mbt_settings5.3060.34
/wp-admin/admin.php?page=mbt_sort_books5.2847.88
Tags /wp-admin/edit-tags.php?taxonomy=mbt_tag&post_type=mbt_book5.3351.83
Import Books /wp-admin/admin.php?page=mbt_import5.2750.84
Authors /wp-admin/edit-tags.php?taxonomy=mbt_author&post_type=mbt_book5.3051.10
Upgrade MyBookTable /wp-admin/admin.php?page=mbt_upgrade_link5.1440.17
Genres /wp-admin/edit-tags.php?taxonomy=mbt_genre&post_type=mbt_book5.3056.92
MyBookTable /wp-admin/admin.php?page=mbt_dashboard24.371,917.73

Server storage [IO: ▲4.24MB] [DB: ▲1.67MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 400 new files
Database: no new tables, 11 new options
New WordPress options
db_upgraded
mbt_tracking_data
widget_mbt_taxonomies
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
widget_mbt_featured_book
mbt_settings
widget_recent-comments
theysaidso_admin_options
...

Browser metrics Passed 4 tests

Checking browser requirements for MyBookTable Bookstore by Stormhill Media
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,912 ▲15014.39 ▲0.122.02 ▲0.3443.30 ▼1.57
Dashboard /wp-admin2,274 ▲975.67 ▲0.1392.12 ▼7.7048.85 ▲4.40
Posts /wp-admin/edit.php2,186 ▲862.03 ▲0.0041.40 ▲3.2242.60 ▲9.33
Add New Post /wp-admin/post-new.php1,992 ▲46323.39 ▲0.24748.14 ▲110.1869.59 ▲21.55
Media Library /wp-admin/upload.php1,482 ▲824.15 ▼0.04101.37 ▲5.5745.11 ▲5.11
Help /wp-admin/admin.php?page=mbt_help3,19120.01431.54103.26
Add Book /wp-admin/post-new.php?post_type=mbt_book4,67510.77300.92166.06
Settings /wp-admin/admin.php?page=mbt_settings2,2973.7996.5894.45
/wp-admin/admin.php?page=mbt_sort_books1,1723.6350.2338.76
Tags /wp-admin/edit-tags.php?taxonomy=mbt_tag&post_type=mbt_book1,6723.8755.2740.85
Import Books /wp-admin/admin.php?page=mbt_import1,1023.5852.6036.70
Authors /wp-admin/edit-tags.php?taxonomy=mbt_author&post_type=mbt_book1,6013.6259.3541.19
Upgrade MyBookTable /wp-admin/admin.php?page=mbt_upgrade_link1,5948.84185.9291.17
Genres /wp-admin/edit-tags.php?taxonomy=mbt_genre&post_type=mbt_book1,5673.2454.8833.77
MyBookTable /wp-admin/admin.php?page=mbt_dashboard1,3123.6047.0171.83

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The uninstall procedure has failed, leaving 11 options in the database
    • widget_mbt_taxonomies
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • mbt_tag_children
    • widget_mbt_featured_book
    • mbt_settings
    • widget_theysaidso_widget
    • mbt_tracking_data
    • widget_recent-comments
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 4× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/mybooktable/templates/archive-book/before.php
    • > /wp-content/plugins/mybooktable/templates/archive-book/no-results.php
    • > /wp-content/plugins/mybooktable/templates/excerpt-book/after.php
    • > /wp-content/plugins/mybooktable/templates/archive-book/after.php
  • 64× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mybooktable/includes/extras/compatibility.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function mbt_the_book_archive_description() in wp-content/plugins/mybooktable/templates/archive-book/header/description.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mybooktable/includes/extras/goodreads.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/mybooktable/templates/excerpt-book/content.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function mbt_get_setting() in wp-content/plugins/mybooktable/templates/excerpt-book/title.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function mbt_start_template_context() in wp-content/plugins/mybooktable/templates/single-book-storefront.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/mybooktable/templates/wrapper-end.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mybooktable/includes/extras/seo.php:30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mybooktable/includes/extras/divi.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mybooktable/includes/setup.php:166

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 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
These attributes need your attention:
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
Please take inspiration from this readme.txt

mybooktable/mybooktable.php Passed 13 tests

Analyzing the main PHP file in "MyBookTable Bookstore by Stormhill Media" version 3.3.4
130 characters long description:
A WordPress Bookstore Plugin to help authors boost book sales on sites like Amazon and Apple iBooks with great-looking book pages.

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
Success! There were no dangerous files found in this plugin22,179 lines of code in 94 files:
LanguageFilesBlank linesComment linesLines of code
PHP651,1703688,083
PO File63,1093,4507,854
CSS137172733,469
JavaScript105594932,773

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity19.00
▷ Minimum class complexity11.00
▷ Maximum class complexity27.00
Average method complexity5.50
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions526
▷ Named functions51497.72%
▷ Anonymous functions122.28%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
249 PNG files occupy 2.27MB with 1.15MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
styles/grey_flat/itunes_button.png8.47KB4.78KB▼ 43.51%
styles/silver/scribd_button.png9.22KB4.32KB▼ 53.11%
styles/blue_flat/pubslush_button.png12.05KB6.12KB▼ 49.21%
styles/golden/pubslush_button.png5.71KB2.98KB▼ 47.85%
styles/blue_flat/alibris_button.png12.16KB4.89KB▼ 59.81%