84% 3d-flipbook-dflip-lite

Code Review | PDF Flipbook, 3D Flipbook - DearFlip

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

About plugin

  • Plugin page: 3d-flipbook-dflip...
  • Plugin version: 2.0.86
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.3
  • WordPress version: 6.3.1
  • First release: Sep 26, 2017
  • Latest release: Oct 19, 2023
  • Number of updates: 135
  • Update frequency: every 16.4 days
  • Top authors: deip (80%)dearhive (20.74%)

Code review

54 tests

User reviews

89 reviews

Install metrics

100,000+ active /922,469 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.26MB] [CPU: ▼7.74ms] Passed 4 tests

Server-side resources used by PDF Flipbook, 3D Flipbook - DearFlip
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.2334.80 ▼4.96
Dashboard /wp-admin3.58 ▲0.2444.81 ▼16.28
Posts /wp-admin/edit.php3.70 ▲0.3443.53 ▼2.11
Add New Post /wp-admin/post-new.php6.17 ▲0.2995.07 ▼7.62
Media Library /wp-admin/upload.php3.51 ▲0.2835.15 ▲1.68
All Books /wp-admin/edit.php?post_type=dflip3.5536.32
Add New Book /wp-admin/post-new.php?post_type=dflip3.6356.28
Categories /wp-admin/edit-tags.php?taxonomy=dflip_category&post_type=dflip3.6332.99

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for PDF Flipbook, 3D Flipbook - DearFlip
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,962 ▲20113.99 ▼0.2526.02 ▲24.4339.01 ▲0.01
Dashboard /wp-admin2,229 ▲495.60 ▼0.0284.19 ▼2.4537.49 ▼2.50
Posts /wp-admin/edit.php2,134 ▲341.98 ▼0.0035.92 ▲0.5836.36 ▲2.01
Add New Post /wp-admin/post-new.php1,564 ▲3818.66 ▼4.33624.56 ▼47.9865.93 ▲12.82
Media Library /wp-admin/upload.php1,437 ▲374.16 ▼0.0797.15 ▼5.1744.70 ▼0.88
All Books /wp-admin/edit.php?post_type=dflip1,1191.9830.3230.20
Add New Book /wp-admin/post-new.php?post_type=dflip3,3438.50206.5560.62
Categories /wp-admin/edit-tags.php?taxonomy=dflip_category&post_type=dflip1,3132.1225.3430.35

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

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
Almost there! Just fix the following items
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > 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/shortcode.php:37
    • > PHP Fatal error
      Uncaught Error: Class 'DFlip' not found in wp-content/plugins/3d-flipbook-dflip-lite/inc/metaboxes.php:50

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
7 plugin tags: 3d flipbook, pdf, pdf viewer, pdf flipbook, flip book...

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

The entry point to "PDF Flipbook, 3D Flipbook - DearFlip" version 2.0.86 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Description: Please keep the plugin description shorter than 140 characters (currently 203 characters long)
  • Text Domain: The text domain should only use lowercase characters and dashes

Code Analysis Passed 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 plugin6,426 lines of code in 30 files:
LanguageFilesBlank linesComment linesLines of code
CSS64271333,230
PHP63605701,498
JavaScript81851771,186
SVG1000512

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity49.00
▷ Minimum class complexity13.00
▷ Maximum class complexity70.00
Average method complexity4.76
▷ 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%