62% real3d-flipbook-lite

Code Review | Real3D Flipbook PDF Viewer Lite

WordPress plugin Real3D Flipbook PDF Viewer Lite scored62%from 54 tests.

About plugin

  • Plugin page: real3d-flipbook-lite
  • Plugin version: 3.42
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Jul 4, 2019
  • Latest release: Oct 12, 2023
  • Number of updates: 16
  • Update frequency: every 97.6 days
  • Top authors: creativeinteractivemedia (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

3,000+ active /26,029 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲5.10MB] [CPU: ▲27.02ms] 75% from 4 tests

This is a short check of server-side resources used by Real3D Flipbook PDF Viewer Lite
Please have a look at the following items
  • Extra RAM: The extra memory usage should kept under 5MB (currently 5.10MB on /wp-admin/admin.php?page=real3d_flipbook_import)
PageMemory (MB)CPU Time (ms)
Home /8.91 ▲5.4470.53 ▲33.25
Dashboard /wp-admin8.93 ▲5.6281.15 ▲36.73
Posts /wp-admin/edit.php8.93 ▲5.5781.97 ▲31.69
Add New Post /wp-admin/post-new.php9.64 ▲3.75107.08 ▲9.09
Media Library /wp-admin/upload.php8.93 ▲5.7069.83 ▲34.06
Add new /wp-admin/post-new.php?post_type=r3d8.9382.55
Add-ons /wp-admin/admin.php?page=real3d_flipbook_addons8.9357.72
Freemius Debug [v.2.5.12] /wp-admin/admin.php?page=freemius8.9358.06
Authors /wp-admin/edit-tags.php?taxonomy=r3d_author&post_type=r3d8.9360.44
Categories /wp-admin/edit-tags.php?taxonomy=r3d_category&post_type=r3d8.9360.27
Activation /wp-admin/admin.php?page=real3d_flipbook_activation8.9357.67
Upgrade to PRO /wp-admin/admin.php?page=real3d_flipbook_upgrade8.9356.06
Settings /wp-admin/admin.php?page=real3d_flipbook_settings8.9362.96
Flipbooks /wp-admin/edit.php?post_type=r3d8.9365.37
Import / Export /wp-admin/admin.php?page=real3d_flipbook_import8.9354.81

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 414 new files
Database: no new tables, 10 new options
New WordPress options
db_upgraded
can_compress_scripts
real3dflipbook_global
widget_recent-comments
fs_active_plugins
widget_theysaidso_widget
widget_recent-posts
fs_accounts
theysaidso_admin_options
fs_debug_mode

Browser metrics Passed 4 tests

Real3D Flipbook PDF Viewer Lite: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,897 ▲11114.17 ▼0.201.96 ▲0.0436.03 ▼6.18
Dashboard /wp-admin2,275 ▲985.51 ▼0.0496.46 ▲6.6946.64 ▲5.91
Posts /wp-admin/edit.php2,181 ▲842.01 ▼0.0235.57 ▼3.9838.31 ▼0.68
Add New Post /wp-admin/post-new.php1,667 ▲14121.60 ▼2.08659.85 ▼24.7637.13 ▼31.04
Media Library /wp-admin/upload.php1,477 ▲774.20 ▲0.0493.50 ▼8.6445.88 ▲0.60
Add new /wp-admin/post-new.php?post_type=r3d10,8277.38501.9053.15
Add-ons /wp-admin/admin.php?page=real3d_flipbook_addons9802.1626.0832.13
Freemius Debug [v.2.5.12] /wp-admin/admin.php?page=freemius1,1351.7023.1027.52
Authors /wp-admin/edit-tags.php?taxonomy=r3d_author&post_type=r3d1,3642.2727.4633.42
Categories /wp-admin/edit-tags.php?taxonomy=r3d_category&post_type=r3d1,3722.3027.3430.65
Activation /wp-admin/admin.php?page=real3d_flipbook_activation2,0013.2353.5639.59
Upgrade to PRO /wp-admin/admin.php?page=real3d_flipbook_upgrade7421.516.6322.94
Settings /wp-admin/admin.php?page=real3d_flipbook_settings7,4574.22326.8838.76
Flipbooks /wp-admin/edit.php?post_type=r3d1,1821.9632.0535.95
Import / Export /wp-admin/admin.php?page=real3d_flipbook_import8872.1623.4829.25

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/real3d-flipbook-lite/freemius/includes/class-freemius.php+8515
    Undefined property: stdClass::$plugins
  • Zombie WordPress options were found after uninstall: 10 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • real3dflipbook_global
    • fs_accounts
    • widget_recent-posts
    • widget_recent-comments
    • fs_active_plugins
    • theysaidso_admin_options
    • fs_debug_mode
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/admin.php?page=real3d_flipbook_activation
    • > POST request to /wp-admin/admin-ajax.php?page=real3d_flipbook_admin
    • > Warning in wp-content/plugins/real3d-flipbook-lite/includes/Real3DFlipbook.php+335
    Invalid argument supplied for foreach()
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=real3d_flipbook_upgrade
    • > Warning in wp-includes/pluggable.php+1438
    Cannot modify header information - headers already sent by (output started at wp-includes/script-loader.php:2838)

SRP 50% 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 take a closer look at the following
  • 6× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_the_ID() in wp-content/plugins/real3d-flipbook-lite/includes/single-r3d.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/real3d-flipbook-lite/includes/Real3DFlipbook.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'Real3DFlipbook' not found in wp-content/plugins/real3d-flipbook-lite/includes/post-type.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/real3d-flipbook-lite/includes/archive-r3d.php:2
    • > PHP Warning
      Use of undefined constant REAL3D_FLIPBOOK_VERSION - assumed 'REAL3D_FLIPBOOK_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/real3d-flipbook-lite/includes/Real3DFlipbook.php on line 25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/real3d-flipbook-lite/includes/taxonomy-r3d_category.php:3

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following browser errors
    • > GET request to /wp-admin/post-new.php?post_type=r3d
    • > Network (severe)
    wp-admin/undefined - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Screenshots: No descriptions were found for these screenshots #1, #10, #11, #12, #13, #2, #3, #4, #5, #6, #7, #8, #9 in real3d-flipbook-lite/assets to your readme.txt
The official readme.txt is a good inspiration

real3d-flipbook-lite/real3d-flipbook-lite.php Passed 13 tests

The main file in "Real3D Flipbook PDF Viewer Lite" v. 3.42 serves as a complement to information provided in readme.txt and as the entry point to the plugin
71 characters long description:
Real3D FlipBook Lite - create realistic 3D flipbook from PDF or images.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin43,548 lines of code in 185 files:
LanguageFilesBlank linesComment linesLines of code
PHP1338,86117,33035,426
JavaScript281,2294996,676
CSS201582121,149
Markdown1680214
SVG10066
XML13016
JSON1001

PHP code 50% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
Please tend to the following items
  • Please reduce cyclomatic complexity of classes to less than 1000 (currently 3,088)
Cyclomatic complexity
Average complexity per logical line of code0.61
Average class complexity92.08
▷ Minimum class complexity1.00
▷ Maximum class complexity3,088.00
Average method complexity4.56
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes50
▷ Abstract classes24.00%
▷ Concrete classes4896.00%
▷ Final classes00.00%
Methods1,308
▷ Static methods20015.29%
▷ Public methods91569.95%
▷ Protected methods201.53%
▷ Private methods37328.52%
Functions116
▷ Named functions116100.00%
▷ Anonymous functions00.00%
Constants147
▷ Global constants10068.03%
▷ Class constants4731.97%
▷ Public constants47100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%