10% vertical-diamond-flipbook-flash

Code Review | Nature FlipBook WordPress Plugin

WordPress plugin Nature FlipBook WordPress Plugin scored10%from 54 tests.

About plugin

  • Plugin page: vertical-diamond-...
  • Plugin version: 1.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.2.4
  • WordPress version: 6.3.1
  • First release: Oct 7, 2016
  • Latest release: Nov 12, 2019
  • Number of updates: 85
  • Update frequency: every 13.4 days
  • Top authors: flashmaniac (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /5,095 total downloads

Benchmarks

Plugin footprint 57% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
These installer errors require your attention
  • The plugin cannot be installed
    • > Warning in wp-content/plugins/vertical-diamond-flipbook-flash/index.php+386
    fopen(wp-content/plugins/vertical-diamond-flipbook-flash/templates/template-flipbook.php): failed to open stream: No such file or directory

Server metrics [RAM: ▲0.23MB] [CPU: ▼19.39ms] Passed 4 tests

A check of server-side resources used by Nature FlipBook WordPress Plugin
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.87 ▲0.4140.92 ▼1.73
Dashboard /wp-admin3.60 ▲0.2938.09 ▼11.77
Posts /wp-admin/edit.php3.67 ▲0.3141.48 ▼10.37
Add New Post /wp-admin/post-new.php5.84 ▼0.0575.88 ▼53.70
Media Library /wp-admin/upload.php3.58 ▲0.3535.55 ▲3.35
Add New Page /wp-admin/post-new.php?post_type=jq_flipbook_v33.6541.80
All Pages /wp-admin/edit.php?post_type=jq_flipbook_v33.6635.88
Settings /wp-admin/edit.php?post_type=jq_flipbook_v3&page=Settings3.5830.08
Help /wp-admin/edit.php?post_type=jq_flipbook_v3&page=nfb3.5831.29
Books /wp-admin/edit-tags.php?taxonomy=jq_flipbook_v3_tax&post_type=jq_flipbook_v33.6639.96

Server storage [IO: ▲1.50MB] [DB: ▲0.00MB] 67% from 3 tests

Input-output and database impact of this plugin
These are issues you should consider
  • Illegal file modification found: 1 file (0.00KB) outside of "wp-content/plugins/vertical-diamond-flipbook-flash/" and "wp-content/uploads/"
    • (new file) wp-content/themes/twentytwentyone/template-flipbook.php
Filesystem: 51 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
nfb_global
widget_theysaidso_widget
db_upgraded
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Nature FlipBook WordPress Plugin
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,014 ▲25715.11 ▲0.791.85 ▼0.0638.13 ▼6.11
Dashboard /wp-admin2,389 ▲2016.50 ▲1.62132.14 ▲13.3640.04 ▼4.50
Posts /wp-admin/edit.php2,305 ▲2193.37 ▲1.3151.42 ▲12.4934.01 ▲1.10
Add New Post /wp-admin/post-new.php1,550 ▲823.29 ▲5.13672.94 ▲16.2737.58 ▼9.55
Media Library /wp-admin/upload.php1,442 ▲574.26 ▼0.0581.99 ▼22.6742.84 ▼1.79
Add New Page /wp-admin/post-new.php?post_type=jq_flipbook_v32,5227.77187.6376.32
All Pages /wp-admin/edit.php?post_type=jq_flipbook_v31,3343.5848.8628.91
Settings /wp-admin/edit.php?post_type=jq_flipbook_v3&page=Settings1,0683.1939.3823.89
Help /wp-admin/edit.php?post_type=jq_flipbook_v3&page=nfb1,0943.1940.9672.86
Books /wp-admin/edit-tags.php?taxonomy=jq_flipbook_v3_tax&post_type=jq_flipbook_v31,5003.3142.4429.24

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • nfb_global
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Please fix the following server-side errors
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=jq_flipbook_v3&page=nfb
    • > Notice in wp-content/plugins/vertical-diamond-flipbook-flash/lib/structure.php+906
    Undefined index: taxonomy
    • > GET request to /wp-admin/post-new.php?post_type=jq_flipbook_v3
    • > Notice in wp-content/plugins/vertical-diamond-flipbook-flash/lib/structure.php+586
    Trying to get property 'slug' of non-object
    • > GET request to /wp-admin/post-new.php?post_type=jq_flipbook_v3
    • > Notice in wp-content/plugins/vertical-diamond-flipbook-flash/lib/function.php+316
    Trying to get property 'term_id' of non-object
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=jq_flipbook_v3
    • > Notice in wp-content/plugins/vertical-diamond-flipbook-flash/lib/structure.php+619
    Undefined variable: thumbpage
    • > GET request to /wp-admin/edit.php?post_type=jq_flipbook_v3&page=Settings
    • > Notice in wp-content/plugins/vertical-diamond-flipbook-flash/lib/structure.php+390
    Undefined index: custom_css

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/vertical-diamond-flipbook-flash/css/editor.php
  • 6× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/vertical-diamond-flipbook-flash/lib/shortcodes.php:83
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/vertical-diamond-flipbook-flash/lib/function.php:773
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/vertical-diamond-flipbook-flash/lib/structure.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/vertical-diamond-flipbook-flash/lib/categories_custom_fields.php:30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/vertical-diamond-flipbook-flash/index.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/vertical-diamond-flipbook-flash/lib/simple-page-ordering.php:31

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 96% 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, pdf viewer, pdf flipbook, pdf embed

vertical-diamond-flipbook-flash/index.php 92% from 13 tests

"Nature FlipBook WordPress Plugin" version 1.7's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("vertical-diamond-flipbook-flash.php" instead of "index.php")

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
Good job! No executable or dangerous file extensions detected6,986 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript101,2354012,636
PHP71,1844812,620
CSS8399911,210
SVG100520

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity22.50
▷ Minimum class complexity8.00
▷ Maximum class complexity37.00
Average method complexity4.07
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods14
▷ Static methods17.14%
▷ Public methods1071.43%
▷ Protected methods00.00%
▷ Private methods428.57%
Functions59
▷ Named functions59100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.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
8 PNG files occupy 0.19MB with 0.11MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
flipbook/img/logo_home.png2.64KB1.20KB▼ 54.41%
flipbook/img/bg.png66.03KB4.58KB▼ 93.06%
img/empty.png4.61KB2.26KB▼ 50.94%
flipbook/img/icons.png50.89KB1.04KB▼ 97.96%
img/jscolor/hv.png2.80KB7.32KB0.00%