78% pdf-flip-book-by-kenrys

Code Review | PDF Flip Book by Kenrys

WordPress plugin PDF Flip Book by Kenrys scored 78% from 54 tests.

About plugin

  • Plugin page: pdf-flip-book-by-...
  • Plugin version: 1.1.2
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.9.5
  • WordPress version: 5.8.1
  • First release: Apr 29, 2018
  • Latest release: May 21, 2018
  • Number of updates: 8
  • Update frequency: every 2.8 days
  • Top authors: kenrys (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active / 2,367 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▼0.89MB] [CPU: ▼176.72ms] Passed 4 tests

Analyzing server-side resources used by PDF Flip Book by Kenrys
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.1435.06 ▲16.84
Dashboard /wp-admin2.75 ▼0.3023.59 ▼29.27
Posts /wp-admin/edit.php2.76 ▼0.3518.53 ▼28.25
Add New Post /wp-admin/post-new.php2.76 ▼2.6821.62 ▼634.90
Media Library /wp-admin/upload.php2.76 ▼0.2518.63 ▼14.47

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 9 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by PDF Flip Book by Kenrys
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,718 ▲14615.85 ▼0.159.50 ▼0.7848.13 ▲0.06
Dashboard /wp-admin2,982 ▲455.94 ▼0.00142.97 ▼9.97107.26 ▼4.01
Posts /wp-admin/edit.php2,754 ▲152.72 ▲0.0271.67 ▲8.9483.83 ▼7.43
Add New Post /wp-admin/post-new.php1,693 ▲19518.34 ▼0.47395.04 ▼8.11109.28 ▼11.77
Media Library /wp-admin/upload.php1,822 ▲155.01 ▼0.03152.96 ▲6.14120.10 ▲0.87

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/pdf-flip-book-by-kenrys/PDF_Flip_Book_Kenrys.php+14
    Undefined variable: name

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/pdf-flip-book-by-kenrys/PDF_Flip_Book_Kenrys_settings.php
  • 16× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Notice
      Undefined variable: ani in wp-content/plugins/pdf-flip-book-by-kenrys/template.php on line 160
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/pdf-flip-book-by-kenrys/template.php on line 107
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/pdf-flip-book-by-kenrys/template.php on line 146
    • > PHP Notice
      Undefined variable: ani in wp-content/plugins/pdf-flip-book-by-kenrys/template.php on line 30
    • > PHP Notice
      Undefined variable: ani in wp-content/plugins/pdf-flip-book-by-kenrys/template.php on line 172
    • > PHP Notice
      Undefined variable: kenrys_atts in wp-content/plugins/pdf-flip-book-by-kenrys/template.php on line 107
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/pdf-flip-book-by-kenrys/template.php:230
    • > PHP Notice
      Undefined variable: ani in wp-content/plugins/pdf-flip-book-by-kenrys/template.php on line 128
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pdf-flip-book-by-kenrys/PDF_Flip_Book_Kenrys.php:16
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/pdf-flip-book-by-kenrys/template.php on line 106

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 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
4 plugin tags: flipbook, shortcode, pdf, visual composer

pdf-flip-book-by-kenrys/PDF_Flip_Book_Kenrys.php 85% from 13 tests

The main PHP script in "PDF Flip Book by Kenrys" version 1.1.2 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("pdf-flip-book-by-kenrys.php" instead of "PDF_Flip_Book_Kenrys.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 162 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin60,802 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript21,98538460,202
PHP3149145597
CSS2002
SVG1001

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.34
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG images were found in this plugin