62% ultimate-pdf-flipbooks-flip-books-made-easy

Code Review | Ultimate PDF Flipbooks | Flip Books Made Easy!

WordPress plugin Ultimate PDF Flipbooks | Flip Books Made Easy! scored62%from 54 tests.

About plugin

  • Plugin page: ultimate-pdf-flip...
  • Plugin version: 3.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.3.2
  • WordPress version: 6.3.1
  • First release: Apr 5, 2019
  • Latest release: Feb 10, 2020
  • Number of updates: 17
  • Update frequency: every 18.3 days
  • Top authors: hasnaink007 (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

400+ active /6,210 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

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

Server-side resources used by Ultimate PDF Flipbooks | Flip Books Made Easy!
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0936.69 ▼3.12
Dashboard /wp-admin3.05 ▼0.2525.95 ▼23.12
Posts /wp-admin/edit.php3.05 ▼0.3023.53 ▼25.19
Add New Post /wp-admin/post-new.php3.05 ▼2.8325.89 ▼68.76
Media Library /wp-admin/upload.php3.05 ▼0.1825.95 ▼10.57
Flip Books /wp-admin/edit.php?post_type=flipbook3.0624.62
Shortcode Generator /wp-admin/edit.php?post_type=flipbook&page=shortcode-page3.0623.85
Add new Book /wp-admin/post-new.php?post_type=flipbook3.0522.97

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 21 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
upfb_admin_notice
db_upgraded
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Ultimate PDF Flipbooks | Flip Books Made Easy!
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,871 ▲13613.45 ▼0.864.30 ▲2.5937.91 ▼9.61
Dashboard /wp-admin2,244 ▲594.87 ▼0.18107.84 ▲0.9943.37 ▼3.05
Posts /wp-admin/edit.php2,124 ▲352.04 ▲0.0335.85 ▼1.0033.43 ▼0.99
Add New Post /wp-admin/post-new.php1,544 ▲3017.78 ▲0.17713.10 ▲15.6059.18 ▲5.58
Media Library /wp-admin/upload.php1,420 ▲324.21 ▼0.00101.68 ▲1.9743.75 ▲0.96
Flip Books /wp-admin/edit.php?post_type=flipbook1,0882.0136.0832.52
Shortcode Generator /wp-admin/edit.php?post_type=flipbook&page=shortcode-page1,1121.6721.8131.95
Add new Book /wp-admin/post-new.php?post_type=flipbook2,2467.53171.1765.14

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • The plugin did not uninstall gracefully
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • Zombie WordPress options were found after uninstall: 7 options
    • db_upgraded
    • upfb_admin_notice
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=flipbook
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
    • > GET request to /wp-admin/post-new.php?post_type=flipbook
    • > Notice in wp-content/plugins/ultimate-pdf-flipbooks-flip-books-made-easy/flipPDF.php+341
    Undefined index: pdf_upload_nonce

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/ultimate-pdf-flipbooks-flip-books-made-easy/includes/essential/upload.php
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/ultimate-pdf-flipbooks-flip-books-made-easy/fpdf_template.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Query' not found in wp-content/plugins/ultimate-pdf-flipbooks-flip-books-made-easy/settings.php:57
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_upload_dir() in wp-content/plugins/ultimate-pdf-flipbooks-flip-books-made-easy/flipPDF.php:29

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
8 plugin tags: pdf, pdf to flip book, flipbook, pdf with animation, flowpaper...

ultimate-pdf-flipbooks-flip-books-made-easy/flipPDF.php 85% from 13 tests

This is the main PHP file of "Ultimate PDF Flipbooks | Flip Books Made Easy!" version 3.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Description: Please keep the plugin description shorter than 140 characters (currently 189 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("ultimate-pdf-flipbooks-flip-books-made-easy.php" instead of "flipPDF.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 detected46,718 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript144,8153,90446,057
PHP443145566
CSS231095

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.44
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%
Functions19
▷ Named functions19100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
There are no PNG files in this plugin