89% responsive-flipbooks

Code Review | Responsive Flipbooks

WordPress plugin Responsive Flipbooks scored 89% from 54 tests.

About plugin

  • Plugin page: responsive-flipbooks
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-4.8.2
  • WordPress version: 5.8.1
  • First release: Oct 17, 2017
  • Latest release: Oct 17, 2017
  • Number of updates: 3
  • Update frequency: every 2.3 days
  • Top authors: codelobster (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

300+ active / 5,526 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼0.07MB] [CPU: ▼159.75ms] Passed 4 tests

An overview of server-side resources used by Responsive Flipbooks
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.98 ▲0.1540.29 ▲4.76
Dashboard /wp-admin3.04 ▼0.0228.63 ▼20.63
Posts /wp-admin/edit.php3.10 ▼0.0132.44 ▼12.96
Add New Post /wp-admin/post-new.php5.10 ▼0.3372.94 ▼600.88
Media Library /wp-admin/upload.php3.06 ▲0.0628.53 ▼4.52

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 76 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Responsive Flipbooks
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,904 ▲30817.51 ▲1.9413.15 ▲2.8942.01 ▼3.46
Dashboard /wp-admin3,187 ▲2538.18 ▲2.18197.25 ▲51.71110.03 ▼0.79
Posts /wp-admin/edit.php2,987 ▲2484.38 ▲1.66115.85 ▲34.6188.30 ▼17.30
Add New Post /wp-admin/post-new.php1,636 ▲2121.17 ▼0.12305.42 ▼14.25127.62 ▲23.68
Media Library /wp-admin/upload.php1,833 ▲264.84 ▼0.19147.72 ▼23.55114.84 ▼2.92

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Uninstall script ran successfully

Smoke tests 50% 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)
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/responsive-flipbooks/inc/classes/responsive-flipbooks-tinymce-addons.class.php
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/responsive-flipbooks/inc/shortcodes.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function PeakResponsiveFlipbooks\\plugin_dir_path() in wp-content/plugins/responsive-flipbooks/inc/loader.php:228

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 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
5 plugin tags: responsive, turnjs, html5, flipbooks, gallery

responsive-flipbooks/responsive-flipbooks.php Passed 13 tests

The primary PHP file in "Responsive Flipbooks" version 1.0 is used by WordPress to initiate all plugin functionality
81 characters long description:
Plugin provides easy managing process of responsive HTML5 flipbooks in wordpress.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin10,080 lines of code in 29 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript138387977,370
CSS91811272,171
PHP68429538
SVG1001

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity14.50
▷ Minimum class complexity2.00
▷ Maximum class complexity29.00
Average method complexity2.38
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods40
▷ Static methods12.50%
▷ Public methods40100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions480.00%
▷ Anonymous functions120.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
42 compressed PNG files occupy 0.05MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/classes/js/jquery-ui/images/ui-icons_454545_256x240.png4.27KB4.11KB▼ 3.78%
inc/classes/js/jquery-ui/images/ui-icons_2e83ff_256x240.png4.27KB4.11KB▼ 3.78%
inc/classes/js/jquery-ui/images/ui-bg_glass_65_ffffff_1x400.png0.10KB0.10KB▼ 5.71%
assets/images/jquery-ui/ui-bg_glass_100_fdf5ce_1x400.png0.12KB0.16KB0.00%
assets/images/folder.png2.23KB1.08KB▼ 51.60%