94% flippingbook

Code Review | FlippingBook

WordPress plugin FlippingBook scored 94% from 54 tests.

About plugin

  • Plugin page: flippingbook
  • Plugin version: 2.0.0
  • PHP compatiblity: 5.5.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-5.8.1
  • WordPress version: 5.8.1
  • First release: Jan 29, 2016
  • Latest release: Oct 8, 2021
  • Number of updates: 43
  • Update frequency: every 48.4 days
  • Top authors: Sergey Chernov (95.35%)eugenelin (6.98%)

Code review

54 tests

User reviews

4 reviews

Install metrics

2,000+ active / 37,495 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.09MB] [CPU: ▼138.27ms] Passed 4 tests

An overview of server-side resources used by FlippingBook
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.92 ▲0.0840.30 ▲3.35
Dashboard /wp-admin3.15 ▲0.1050.47 ▲14.86
Posts /wp-admin/edit.php3.24 ▲0.1351.10 ▲4.89
Add New Post /wp-admin/post-new.php5.51 ▲0.0895.08 ▼559.88
Media Library /wp-admin/upload.php3.09 ▲0.0935.48 ▼1.42

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by FlippingBook
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,698 ▲10215.87 ▲0.5910.94 ▲3.7744.96 ▼8.22
Dashboard /wp-admin2,979 ▲485.88 ▼0.08138.50 ▼2.42139.20 ▲22.82
Posts /wp-admin/edit.php2,776 ▲402.68 ▼0.0267.54 ▲0.2092.68 ▼1.01
Add New Post /wp-admin/post-new.php1,696 ▲1318.50 ▲0.03384.47 ▲4.58113.45 ▼1.66
Media Library /wp-admin/upload.php1,767 ▼405.01 ▼0.01141.79 ▼15.31158.42 ▲38.49

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

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means 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
Please take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/flippingbook/flippingbook.php:47

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 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:
  • Tags: Please reduce the number of tags, currently 25 tag instead of maximum 10
Please take inspiration from this readme.txt

flippingbook/flippingbook.php Passed 13 tests

The main file in "FlippingBook" v. 2.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
116 characters long description:
FlippingBook plugin allows you to easily embed flipbooks made with FlippingBook into your Wordpress posts and pages.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected442 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP14948442

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity52.00
▷ Minimum class complexity52.00
▷ Maximum class complexity52.00
Average method complexity3.43
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods21
▷ Static methods00.00%
▷ Public methods21100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
flippingbook-icon.png0.66KB0.94KB0.00%