79% book-review-library

Code Review | Book Review Library

WordPress plugin Book Review Library scored79%from 54 tests.

About plugin

  • Plugin page: book-review-library
  • Plugin version: 1.4.23
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-6.1
  • WordPress version: 6.3.1
  • First release: Aug 26, 2013
  • Latest release: Jul 19, 2022
  • Number of updates: 55
  • Update frequency: every 59.1 days
  • Top authors: jazzs3quence (100%)

Code review

54 tests

User reviews

16 reviews

Install metrics

300+ active /31,402 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.55MB] [CPU: ▲4.20ms] Passed 4 tests

Server-side resources used by Book Review Library
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.03 ▲0.5650.95 ▲14.48
Dashboard /wp-admin3.85 ▲0.5555.02 ▲5.68
Posts /wp-admin/edit.php3.97 ▲0.6154.70 ▲2.76
Add New Post /wp-admin/post-new.php6.46 ▲0.57109.35 ▲6.72
Media Library /wp-admin/upload.php3.77 ▲0.5439.73 ▲1.65
Options /wp-admin/edit.php?post_type=book-review&page=book-review-library-options3.7935.79
Add New /wp-admin/post-new.php?post_type=book-review3.9059.14
Book Reviews /wp-admin/edit.php?post_type=book-review3.8141.38
Book Authors /wp-admin/edit-tags.php?taxonomy=book-author&post_type=book-review3.7638.06
Genres /wp-admin/edit-tags.php?taxonomy=genre&post_type=book-review3.7638.82

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 54 new files
Database: no new tables, 8 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-book-review-widget
can_compress_scripts
widget_recent-comments
widget_book-review-widget
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Book Review Library
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,837 ▲5114.34 ▼0.251.88 ▼0.3343.39 ▲1.38
Dashboard /wp-admin2,243 ▲795.64 ▼0.0489.80 ▼12.1637.76 ▼6.92
Posts /wp-admin/edit.php2,160 ▲572.25 ▲0.2740.07 ▼1.3735.93 ▼5.51
Add New Post /wp-admin/post-new.php1,564 ▲2923.66 ▲5.46669.33 ▲51.6673.11 ▲6.81
Media Library /wp-admin/upload.php1,447 ▲444.23 ▼0.0598.08 ▼4.9248.16 ▲2.46
Options /wp-admin/edit.php?post_type=book-review&page=book-review-library-options1,1961.7728.5628.44
Add New /wp-admin/post-new.php?post_type=book-review2,4647.90179.1672.65
Book Reviews /wp-admin/edit.php?post_type=book-review1,1212.1732.3629.37
Book Authors /wp-admin/edit-tags.php?taxonomy=book-author&post_type=book-review1,3332.2628.5830.20
Genres /wp-admin/edit-tags.php?taxonomy=genre&post_type=book-review1,3032.2630.3230.60

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 8 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_book-review-widget
    • widget_recent-posts
    • widget_recent-book-review-widget
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/edit.php?post_type=book-review&page=book-review-library-options
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/edit.php?post_type=book-review&page=book-review-library-options
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

SRP 50% 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
The following issues need your attention
  • 7× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      include_once(): Failed opening 'BOOK_REVIEWS_FUNC' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/book-review-library/views/actions.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function screen_icon() in wp-content/plugins/book-review-library/views/admin.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/book-review-library/views/public.php:12
    • > PHP Warning
      Use of undefined constant BOOK_REVIEWS_FUNC - assumed 'BOOK_REVIEWS_FUNC' (this will throw an Error in a future version of PHP) in wp-content/plugins/book-review-library/views/actions.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/book-review-library/inc/widgets.php:17
    • > PHP Warning
      include_once(BOOK_REVIEWS_FUNC): failed to open stream: No such file or directory in wp-content/plugins/book-review-library/views/actions.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/book-review-library/views/public.php:12

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
6 plugin tags: library, book, custom post type, librarian, reading level...

book-review-library/book-review-library.php Passed 13 tests

The main PHP file in "Book Review Library" ver. 1.4.23 adds more information about the plugin and also serves as the entry point for this plugin
86 characters long description:
A book cataloguing and review system designed with bookophiles and librarians in mind.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin7,409 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
PO File112,1352,4124,680
PHP102826962,394
CSS32620218
SVG100105
JavaScript12012

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity69.67
▷ Minimum class complexity15.00
▷ Maximum class complexity169.00
Average method complexity5.58
▷ Minimum method complexity1.00
▷ Maximum method complexity89.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods45
▷ Static methods36.67%
▷ Public methods4497.78%
▷ Protected methods00.00%
▷ Private methods12.22%
Functions36
▷ Named functions36100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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