78% recencio-book-reviews

Code Review | Recencio Book Reviews

WordPress plugin Recencio Book Reviews scored78%from 54 tests.

About plugin

  • Plugin page: recencio-book-rev...
  • Plugin version: 1.66.0
  • PHP compatiblity: 5.6.25+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.3
  • WordPress version: 6.3.1
  • First release: Jul 12, 2017
  • Latest release: Sep 19, 2023
  • Number of updates: 158
  • Update frequency: every 14.3 days
  • Top authors: w33zy (100%)

Code review

54 tests

User reviews

49 reviews

Install metrics

1,000+ active /46,145 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲2.73MB] [CPU: ▲15.77ms] Passed 4 tests

A check of server-side resources used by Recencio Book Reviews
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /5.99 ▲2.5265.93 ▲20.66
Dashboard /wp-admin6.16 ▲2.8174.83 ▲8.26
Posts /wp-admin/edit.php6.19 ▲2.8380.93 ▲29.43
Add New Post /wp-admin/post-new.php8.96 ▲3.07108.56 ▲10.83
Media Library /wp-admin/upload.php5.99 ▲2.7665.58 ▲23.31
Authors /wp-admin/edit-tags.php?taxonomy=rcno_author&post_type=rcno_review6.0059.54
Genres /wp-admin/edit-tags.php?taxonomy=rcno_genre&post_type=rcno_review5.9955.21
New Review /wp-admin/post-new.php?post_type=rcno_review6.2890.73
All Reviews /wp-admin/edit.php?post_type=rcno_review6.1868.95
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=rcno_review6.0059.78
Extensions /wp-admin/edit.php?post_type=rcno_review&page=rcno_extensions6.0061.39
Series /wp-admin/edit-tags.php?taxonomy=rcno_series&post_type=rcno_review5.9959.41
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=rcno_review6.0766.91
Settings /wp-admin/edit.php?post_type=rcno_review&page=recencio-book-reviews6.0562.61
Publishers /wp-admin/edit-tags.php?taxonomy=rcno_publisher&post_type=rcno_review5.9956.40

Server storage [IO: ▲3.21MB] [DB: ▲0.01MB] Passed 3 tests

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 218 new files
Database: no new tables, 15 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_rcno-reviews-book-slider
can_compress_scripts
category_children
widget_rcno-reviews-book-grid
widget_rcno-reviews-recent-reviews
widget_rcno-reviews-tag-cloud
widget_theysaidso_widget
widget_rcno-reviews-taxonomy-list
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Recencio Book Reviews
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,536 ▲77515.91 ▲1.536.05 ▲4.2143.30 ▼0.22
Dashboard /wp-admin2,840 ▲6636.99 ▲1.36135.59 ▲37.4541.01 ▼0.32
Posts /wp-admin/edit.php2,484 ▲3842.41 ▲0.4544.54 ▲7.6234.89 ▼0.85
Add New Post /wp-admin/post-new.php1,867 ▲33023.33 ▲5.07690.38 ▲46.4436.86 ▼29.46
Media Library /wp-admin/upload.php1,656 ▲2624.26 ▲0.0684.69 ▼15.1242.17 ▼1.27
Authors /wp-admin/edit-tags.php?taxonomy=rcno_author&post_type=rcno_review1,6532.0342.9831.63
Genres /wp-admin/edit-tags.php?taxonomy=rcno_genre&post_type=rcno_review1,6402.0031.5030.89
New Review /wp-admin/post-new.php?post_type=rcno_review4,4359.92274.3291.73
All Reviews /wp-admin/edit.php?post_type=rcno_review1,7255.1988.8732.78
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=rcno_review1,7001.9731.8332.01
Extensions /wp-admin/edit.php?post_type=rcno_review&page=rcno_extensions1,4164.8951.9973.23
Series /wp-admin/edit-tags.php?taxonomy=rcno_series&post_type=rcno_review1,6401.9130.9330.65
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=rcno_review1,8361.9834.3032.65
Settings /wp-admin/edit.php?post_type=rcno_review&page=recencio-book-reviews1,4354.7954.8931.65
Publishers /wp-admin/edit-tags.php?taxonomy=rcno_publisher&post_type=rcno_review1,6341.9932.8529.65

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 15 options
    • widget_recent-posts
    • category_children
    • widget_recent-comments
    • widget_rcno-reviews-book-grid
    • theysaidso_admin_options
    • widget_rcno-reviews-currently-reading
    • widget_rcno-reviews-tag-cloud
    • widget_rcno-reviews-book-slider
    • rcno_reviews_settings
    • db_upgraded
    • ...

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 everything seems fine, this is not an exhaustive test

SRP 0% 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
Please fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/recencio-book-reviews/public/partials/rcno-reviews-public-display.php
  • 91× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Rcno_Template_Tags' not found in wp-content/plugins/recencio-book-reviews/extensions/rcno-social-media-sharing/includes/all-buttons.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/recencio-book-reviews/admin/views/rcno-reviews-modal.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/recencio-book-reviews/public/widgets/class-rcno-reviews-book-grid.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Rcno_Template_Tags' not found in wp-content/plugins/recencio-book-reviews/public/templates/rcno_default/reviews_index.php:6
    • > PHP Warning
      Use of undefined constant RCNO_PLUGIN_PATH - assumed 'RCNO_PLUGIN_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/recencio-book-reviews/includes/class-rcno-reviews-shortcodes.php on line 26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post() in wp-content/plugins/recencio-book-reviews/public/templates/rcno_metamor/review.php:16
    • > PHP Warning
      include(RCNO_PLUGIN_PATHpublic/shortcodes/class-rcno-table-shortcode.php): failed to open stream: No such file or directory in wp-content/plugins/recencio-book-reviews/includes/class-rcno-reviews-shortcodes.php on line 30
    • > PHP Notice
      Undefined variable: options in wp-content/plugins/recencio-book-reviews/public/shortcodes/layouts/rcno-isotope-html.php on line 40
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post() in wp-content/plugins/recencio-book-reviews/public/templates/rcno_metamor/excerpt.php:13
    • > PHP Notice
      Undefined variable: taxonomy in wp-content/plugins/recencio-book-reviews/admin/views/rcno-author-taxonomy-metabox.php on line 2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration Passed 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
4 plugin tags: reviews, book ratings, book reviews, book library

recencio-book-reviews/recencio-book-reviews.php Passed 13 tests

"Recencio Book Reviews" version 1.66.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
122 characters long description:
A powerful and very flexible tool to manage your blog’s book review collection. Designed with the book reviewer in mind.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin36,067 lines of code in 167 files:
LanguageFilesBlank linesComment linesLines of code
PHP1113,4417,41013,710
JavaScript271,4861,61110,686
PO File62,9824,2257,526
CSS21731733,929
SVG211216

PHP code 50% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
The following items need your attention
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 153)
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity26.76
▷ Minimum class complexity1.00
▷ Maximum class complexity286.00
Average method complexity3.65
▷ Minimum method complexity1.00
▷ Maximum method complexity153.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes59
▷ Abstract classes11.69%
▷ Concrete classes5898.31%
▷ Final classes00.00%
Methods572
▷ Static methods172.97%
▷ Public methods50488.11%
▷ Protected methods111.92%
▷ Private methods579.97%
Functions51
▷ Named functions2956.86%
▷ Anonymous functions2243.14%
Constants31
▷ Global constants1445.16%
▷ Class constants1754.84%
▷ Public constants17100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
17 PNG files occupy 0.12MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/templates/rcno_basic/screenshot.png1.85KB0.74KB▼ 60.14%
admin/images/logo-30-color.png0.81KB0.54KB▼ 33.78%
public/templates/rcno_inverse/screenshot.png4.12KB0.66KB▼ 84.03%
extensions/rcno-posts-to-reviews/assets/images/_rcno-posts-to-reviews.png2.93KB2.89KB▼ 1.33%
public/templates/rcno_metamor/screenshot.png1.16KB0.83KB▼ 28.10%