78% bcs-bertline-book-importer

Code Review | BCS BatchLine Book Importer

WordPress plugin BCS BatchLine Book Importer scored 78% from 54 tests.

About plugin

  • Plugin page: bcs-bertline-book...
  • Plugin version: 1.6.11
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.0
  • WordPress version: 6.3.1
  • First release: Dec 22, 2020
  • Latest release: Jun 1, 2023
  • Number of updates: 57
  • Update frequency: every 15.6 days
  • Top authors: bcsstudio (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active / 2,365 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.24MB] [CPU: ▼4.85ms] 75% from 4 tests

Server-side resources used by BCS BatchLine Book Importer
Please take the time to fix the following items
  • CPU: You should keep total CPU usage under 500.00ms (currently 1,404.95ms on /wp-admin/tools.php?page=bcs-book-import)
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.2441.50 ▲0.59
Dashboard /wp-admin3.54 ▲0.2443.97 ▼6.32
Posts /wp-admin/edit.php3.66 ▲0.3050.68 ▲1.31
Add New Post /wp-admin/post-new.php6.13 ▲0.2485.53 ▼14.99
Media Library /wp-admin/upload.php3.47 ▲0.2435.65 ▲1.40
Book Import /wp-admin/tools.php?page=bcs-book-import3.451,404.95

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for BCS BatchLine Book Importer
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲5114.68 ▲0.101.80 ▼0.0244.30 ▲3.92
Dashboard /wp-admin2,215 ▲274.84 ▼0.0399.45 ▼15.8138.50 ▼4.06
Posts /wp-admin/edit.php2,098 ▲92.05 ▲0.0738.19 ▼1.9835.16 ▼2.72
Add New Post /wp-admin/post-new.php1,539 ▲2023.38 ▲0.16632.93 ▼59.0648.96 ▼10.36
Media Library /wp-admin/upload.php1,397 ▲94.21 ▼0.0294.50 ▼10.8245.16 ▼2.22
Book Import /wp-admin/tools.php?page=bcs-book-import1,2753.1042.4827.71

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
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
    • > GET request to /wp-admin/tools.php?page=bcs-book-import
    • > Warning in wp-includes/functions.php+6691
    file_get_contents(wp-content/plugins/woocommerce/woocommerce.php): failed to open stream: No such file or directory
    • > GET request to /wp-admin/tools.php?page=bcs-book-import
    • > Warning in wp-content/plugins/bcs-bertline-book-importer/inc/bcs-import.php+766
    Invalid argument supplied for foreach()

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 53× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Notice
      Trying to get property 'content' of non-object in wp-content/plugins/bcs-bertline-book-importer/inc/bcs-get-values.php on line 5
    • > PHP Notice
      Undefined variable: item in wp-content/plugins/bcs-bertline-book-importer/inc/bcs-get-values.php on line 18
    • > PHP Notice
      Trying to get property 'title' of non-object in wp-content/plugins/bcs-bertline-book-importer/inc/bcs-get-values.php on line 3
    • > PHP Notice
      Undefined variable: item in wp-content/plugins/bcs-bertline-book-importer/inc/bcs-get-values.php on line 21
    • > PHP Notice
      Trying to get property 'edition' of non-object in wp-content/plugins/bcs-bertline-book-importer/inc/bcs-get-values.php on line 18
    • > PHP Notice
      Undefined variable: item in wp-content/plugins/bcs-bertline-book-importer/inc/bcs-get-values.php on line 24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/bcs-bertline-book-importer/inc/bcs-woo-functions.php:4
    • > PHP Notice
      Trying to get property 'stock' of non-object in wp-content/plugins/bcs-bertline-book-importer/inc/bcs-get-values.php on line 11
    • > PHP Notice
      Trying to get property 'publisher' of non-object in wp-content/plugins/bcs-bertline-book-importer/inc/bcs-get-values.php on line 13
    • > PHP Notice
      Trying to get property 'dewey' of non-object in wp-content/plugins/bcs-bertline-book-importer/inc/bcs-get-values.php on line 24

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
3 plugin tags: batchline, import, bertline

bcs-bertline-book-importer/bcs-bertline-book-importer.php Passed 13 tests

The entry point to "BCS BatchLine Book Importer" version 1.6.11 is a PHP file that has certain tags in its header comment area
42 characters long description:
Import books from BatchLine's web exporter

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin1,793 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP72651631,716
CSS10076
JavaScript1001

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions58
▷ Named functions5696.55%
▷ Anonymous functions23.45%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin