10% wppageflip

Code Review | A Page Flip Book

WordPress plugin A Page Flip Book scored 10% from 54 tests.

About plugin

  • Plugin page: wppageflip
  • Plugin version: 3.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0.2-3.5.2
  • WordPress version: 6.3.1
  • First release: Dec 7, 2008
  • Latest release: Jun 27, 2013
  • Number of updates: 85
  • Update frequency: every 19.6 days
  • Top authors: zattara777 (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

60+ active / 56,614 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
These installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/wppageflip/pageflipbook.php+53
    Undefined variable: table_prefix

Server metrics [RAM: ▲0.00MB] [CPU: ▼6.42ms] Passed 4 tests

An overview of server-side resources used by A Page Flip Book
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0044.12 ▲4.14
Dashboard /wp-admin3.31 ▲0.0044.73 ▼5.57
Posts /wp-admin/edit.php3.36 ▲0.0045.02 ▼7.23
Add New Post /wp-admin/post-new.php5.89 ▲0.0095.27 ▼13.18
Media Library /wp-admin/upload.php3.23 ▲0.0035.66 ▲0.30

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 97 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for A Page Flip Book
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.22 ▼1.091.54 ▼0.0739.44 ▼3.61
Dashboard /wp-admin2,209 ▲215.88 ▲0.89106.66 ▼9.7242.52 ▼3.13
Posts /wp-admin/edit.php2,089 ▼02.04 ▼0.0140.90 ▲0.4034.41 ▼0.78
Add New Post /wp-admin/post-new.php1,535 ▲2123.24 ▲5.69600.51 ▼17.1553.66 ▲0.85
Media Library /wp-admin/upload.php1,391 ▼04.22 ▲0.0395.89 ▼1.1741.62 ▼3.84

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 0% 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
Please fix the following items
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/wppageflip/upgrade.php
    • > /wp-content/plugins/wppageflip/js/insertdialog.php
  • 7× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wppageflip/pageflipbook.php:28
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wppageflip/display_page.php on line 3
    • > PHP Warning
      Use of undefined constant TXT_WPPF_UPGRADE - assumed 'TXT_WPPF_UPGRADE' (this will throw an Error in a future version of PHP) in wp-content/plugins/wppageflip/upgrade.php on line 4
    • > WordPress database error Table 'potrivit.wp_pageflipbook' doesn't exist for query SELECT DISTINCT id_book FROM `wp_pageflipbook`
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wppageflip/pageflipbook.php on line 26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wppageflip/display_page.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wppageflip/quicktags.php:26

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Screenshots: These screenshots require images: #1 (Easy to configure), #2 (Easy to manage), #3 (Enjoy your book !)
  • Plugin Name: Please specify the plugin name on the first line ( === wppageflip === )
  • Tags: Please reduce the number of tags, currently 39 tag instead of maximum 10
The official readme.txt is a good inspiration

wppageflip/pageflipbook.php 85% from 13 tests

This is the main PHP file of "A Page Flip Book" version 3.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 191 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wppageflip.php" instead of "pageflipbook.php")

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
Good job! No executable or dangerous file extensions detected3,906 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP92473292,450
JavaScript112501081,421
CSS13018
XML10017

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity108.00
▷ Minimum class complexity108.00
▷ Maximum class complexity108.00
Average method complexity5.28
▷ Minimum method complexity1.00
▷ Maximum method complexity58.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods25
▷ Static methods00.00%
▷ Public methods2392.00%
▷ Protected methods00.00%
▷ Private methods28.00%
Functions29
▷ Named functions29100.00%
▷ Anonymous functions00.00%
Constants167
▷ Global constants16699.40%
▷ Class constants10.60%
▷ Public constants1100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
24 PNG files occupy 1.17MB with 0.58MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/vPLUS.png5.34KB3.24KB▼ 39.27%
images/image.png0.50KB0.59KB0.00%
screenshot-2.png245.91KB63.82KB▼ 74.05%
images/controls/zoom-minus-grey.png4.36KB1.48KB▼ 66.09%
images/controls/zoom-plus-grey.png4.38KB1.46KB▼ 66.54%