94% 3d-flipbook-dflip-lite

Code Review | PDF Flipbook, 3D Flipbook WordPress - DearFlip

WordPress plugin PDF Flipbook, 3D Flipbook WordPress - DearFlip scored 94% from 54 tests.

About plugin

  • Plugin page: 3d-flipbook-dflip...
  • Plugin version: 1.7.25
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.8
  • WordPress version: 5.9.2
  • First release: Sep 26, 2017
  • Latest release: Mar 12, 2022
  • Number of updates: 122
  • Update frequency: every 13.4 days
  • Top authors: deip (88.52%)dearhive (12.3%)

Code review

54 tests

User reviews

63 reviews

Install metrics

70,000+ active / 456,903 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.27MB] [CPU: ▼288.55ms] Passed 4 tests

A check of server-side resources used by PDF Flipbook, 3D Flipbook WordPress - DearFlip
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.81 ▲0.3055.36 ▲0.18
Dashboard /wp-admin3.70 ▲0.2934.95 ▲1.79
Posts /wp-admin/edit.php3.93 ▲0.2937.36 ▼0.85
Add New Post /wp-admin/post-new.php7.17 ▲0.20108.08 ▼1,154.99
Media Library /wp-admin/upload.php3.58 ▲0.2825.90 ▲1.45
Add New Book /wp-admin/post-new.php?post_type=dflip3.9356.56
All Books /wp-admin/edit.php?post_type=dflip3.6929.62
Categories /wp-admin/edit-tags.php?taxonomy=dflip_category&post_type=dflip3.5829.38

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 210 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by PDF Flipbook, 3D Flipbook WordPress - DearFlip
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,958 ▲20416.78 ▲0.8033.61 ▲27.5318.61 ▲16.07
Dashboard /wp-admin2,932 ▲716.07 ▼0.11126.55 ▼10.11158.27 ▼7.10
Posts /wp-admin/edit.php2,732 ▲383.25 ▲0.0163.47 ▼1.18141.43 ▼2.54
Add New Post /wp-admin/post-new.php1,690 ▼2116.51 ▼5.04405.26 ▼39.35154.76 ▼6.02
Media Library /wp-admin/upload.php1,743 ▲485.54 ▲0.03138.61 ▼15.82182.57 ▼18.26
Add New Book /wp-admin/post-new.php?post_type=dflip4,33910.12229.44193.23
All Books /wp-admin/edit.php?post_type=dflip1,4423.1664.35118.60
Categories /wp-admin/edit-tags.php?taxonomy=dflip_category&post_type=dflip1,6782.7656.44111.82

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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
The following issues need your attention
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'DFlip' not found in wp-content/plugins/3d-flipbook-dflip-lite/inc/post-type.php:41
    • > PHP Fatal error
      Uncaught Error: Class 'DFlip' not found in wp-content/plugins/3d-flipbook-dflip-lite/inc/metaboxes.php:50
    • > PHP Fatal error
      Uncaught Error: Class 'DFlip' not found in wp-content/plugins/3d-flipbook-dflip-lite/inc/shortcode.php:37

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

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
7 plugin tags: flipbook, pdf viewer, 3d flipbook, pdf embed, pdf...

3d-flipbook-dflip-lite/3d-flipbook-dflip-lite.php 85% from 13 tests

Analyzing the main PHP file in "PDF Flipbook, 3D Flipbook WordPress - DearFlip" version 1.7.25
It is important to fix the following:
  • Text Domain: The text domain name should consist of only dashes and lowercase characters
  • Description: Please keep the plugin description shorter than 140 characters (currently 203 characters long)

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
There were no executable files found in this plugin7,240 lines of code in 29 files:
LanguageFilesBlank linesComment linesLines of code
CSS64271333,232
JavaScript81851871,997
PHP53605681,499
SVG1000512

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity49.50
▷ Minimum class complexity13.00
▷ Maximum class complexity70.00
Average method complexity4.80
▷ Minimum method complexity1.00
▷ Maximum method complexity53.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods51
▷ Static methods47.84%
▷ Public methods4792.16%
▷ Protected methods00.00%
▷ Private methods47.84%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/chrome-extension.png13.08KB6.28KB▼ 52.01%