78% bookwize-integrated-cinnamon

Code Review | Bookwize Integrated Cinnamon

WordPress plugin Bookwize Integrated Cinnamon scored78%from 54 tests.

About plugin

  • Plugin page: bookwize-integrat...
  • Plugin version: 2.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.1-5.8
  • WordPress version: 6.3.1
  • First release: Oct 20, 2017
  • Latest release: Oct 21, 2021
  • Number of updates: 110
  • Update frequency: every 13.7 days
  • Top authors: bookwize (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,325 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.15MB] [CPU: ▲0.89ms] Passed 4 tests

Server-side resources used by Bookwize Integrated Cinnamon
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0236.57 ▼4.66
Dashboard /wp-admin3.49 ▲0.1956.62 ▲5.28
Posts /wp-admin/edit.php3.59 ▲0.2357.35 ▲9.07
Add New Post /wp-admin/post-new.php6.10 ▲0.21100.95 ▼2.41
Media Library /wp-admin/upload.php3.42 ▲0.1945.16 ▲5.35

Server storage [IO: ▲5.87MB] [DB: ▲0.18MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 169 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
wp-dynamic-css-cache
widget_recent-comments
can_compress_scripts
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Bookwize Integrated Cinnamon
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,832 ▲7114.78 ▲0.252.07 ▲0.1441.81 ▼3.51
Dashboard /wp-admin2,235 ▲585.69 ▲0.1884.23 ▼22.0439.24 ▼4.19
Posts /wp-admin/edit.php2,145 ▲452.24 ▲0.2541.45 ▲4.0935.15 ▼0.80
Add New Post /wp-admin/post-new.php6,280 ▲4,75219.08 ▼4.26887.65 ▲210.1837.90 ▼10.63
Media Library /wp-admin/upload.php1,443 ▲464.40 ▲0.2599.98 ▼18.5949.97 ▲2.40

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • wp-dynamic-css-cache
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however 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 take a closer look at the following
  • 6× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/bookwize-integrated-cinnamon/public/partials/bookwize-public-display.php
    • > /wp-content/plugins/bookwize-integrated-cinnamon/public/vendor/stlyle.php
    • > /wp-content/plugins/bookwize-integrated-cinnamon/admin/partials/bookwize-integrated-cinnamon-admin-display.php
    • > /wp-content/plugins/bookwize-integrated-cinnamon/includes/bootstrap.php
    • > /wp-content/plugins/bookwize-integrated-cinnamon/public/partials/bookwize-public-form.php
    • > /wp-content/plugins/bookwize-integrated-cinnamon/admin/partials/bookwize-integrated-cinnamon-admin-flash-message.php
  • 17× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Warning
      Use of undefined constant BW_PUBLIC_URL - assumed 'BW_PUBLIC_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/bookwize-integrated-cinnamon/public/partials/bookwize-public-display.php on line 48
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/bookwize-integrated-cinnamon/functions.php:334
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/bookwize-integrated-cinnamon/admin/partials/bookwize-integrated-cinnamon-admin-settings.php:5
    • > PHP Notice
      Undefined variable: message in wp-content/plugins/bookwize-integrated-cinnamon/admin/partials/bookwize-integrated-cinnamon-admin-flash-message.php on line 2
    • > PHP Warning
      Use of undefined constant BW_PUBLIC_URL - assumed 'BW_PUBLIC_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/bookwize-integrated-cinnamon/public/partials/bookwize-public-display.php on line 33
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/bookwize-integrated-cinnamon/admin/partials/bookwize-integrated-cinnamon-admin-meta-box.php:2
    • > PHP Warning
      Use of undefined constant BW_PUBLIC_URL - assumed 'BW_PUBLIC_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/bookwize-integrated-cinnamon/public/partials/bookwize-public-display.php on line 32
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/bookwize-integrated-cinnamon/public/template-redirect-jcc.php:12
    • > PHP Warning
      Use of undefined constant BW_PUBLIC_URL - assumed 'BW_PUBLIC_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/bookwize-integrated-cinnamon/public/partials/bookwize-public-display.php on line 36
    • > PHP Warning
      Use of undefined constant BW_PUBLIC_URL - assumed 'BW_PUBLIC_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/bookwize-integrated-cinnamon/public/partials/bookwize-public-display.php on line 38

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed: You can take inspiration from this readme.txt

bookwize-integrated-cinnamon/bookwize-integrated-cinnamon.php 85% from 13 tests

This is the main PHP file of "Bookwize Integrated Cinnamon" version 2.5, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Domain Path: The domain path is 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
No dangerous file extensions were detected36,341 lines of code in 125 files:
LanguageFilesBlank linesComment linesLines of code
CSS101227618,948
HTML421,5499016,797
SVG3033,343
PHP314609402,129
JavaScript106242201,806
Sass1434341,656
LESS1434441,646
JSON10016

PHP code Passed 2 tests

Analyzing 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.38
Average class complexity7.53
▷ Minimum class complexity1.00
▷ Maximum class complexity22.00
Average method complexity1.95
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes15
▷ Abstract classes00.00%
▷ Concrete classes15100.00%
▷ Final classes00.00%
Methods99
▷ Static methods1010.10%
▷ Public methods7878.79%
▷ Protected methods1414.14%
▷ Private methods77.07%
Functions22
▷ Named functions1986.36%
▷ Anonymous functions313.64%
Constants14
▷ Global constants14100.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
9 PNG files occupy 0.47MB with 0.28MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/img/banner-772x250png.png56.58KB20.57KB▼ 63.64%
public/img/screenshot4.png58.10KB23.58KB▼ 59.41%
public/img/screenshot3.png212.02KB77.71KB▼ 63.35%
public/img/credit-cards.png13.49KB6.00KB▼ 55.50%
public/img/banner-1544x500.png77.11KB33.90KB▼ 56.04%