62% easy-page-flip

Code Review | Easy Page Flip

WordPress plugin Easy Page Flip scored62%from 54 tests.

About plugin

  • Plugin page: easy-page-flip
  • Plugin version: 1.2.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.6
  • WordPress version: 6.3.1
  • First release: Oct 16, 2013
  • Latest release: Jul 30, 2016
  • Number of updates: 25
  • Update frequency: every 40.7 days
  • Top authors: chrdesigner (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active /10,578 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▼1.92MB] [CPU: ▼54.09ms] Passed 4 tests

This is a short check of server-side resources used by Easy Page Flip
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.07 ▼1.395.43 ▼33.25
Dashboard /wp-admin2.09 ▼1.255.91 ▼49.41
Posts /wp-admin/edit.php2.10 ▼1.266.10 ▼43.97
Add New Post /wp-admin/post-new.php2.09 ▼3.797.59 ▼89.74
Media Library /wp-admin/upload.php2.09 ▼1.146.22 ▼25.26
Add New /wp-admin/post-new.php?post_type=pageflip2.106.13
Magazines /wp-admin/edit.php?post_type=pageflip2.107.04

Server storage [IO: ▲0.19MB] [DB: ▲0.07MB] Passed 3 tests

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 30 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Easy Page Flip: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,915 ▲16913.52 ▼0.838.94 ▲7.4742.52 ▲0.95
Dashboard /wp-admin2,221 ▲475.56 ▲0.0482.06 ▼3.5037.23 ▼4.27
Posts /wp-admin/edit.php2,132 ▲322.10 ▲0.1234.12 ▼1.8333.15 ▼1.69
Add New Post /wp-admin/post-new.php1,562 ▲3418.33 ▼4.89618.28 ▼51.1266.89 ▲12.16
Media Library /wp-admin/upload.php1,426 ▲264.24 ▲0.0694.71 ▼3.6344.88 ▲0.95
Add New /wp-admin/post-new.php?post_type=pageflip2,4127.67165.3871.90
Magazines /wp-admin/edit.php?post_type=pageflip1,0831.9529.6131.15

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The plugin did not uninstall gracefully
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the script-easing handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Please fix the following server-side errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=pageflip
    • > POST request to /wp-admin/admin-ajax.php
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the script-easing handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=pageflip
    • > POST request to /wp-admin/admin-ajax.php
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the script-booklet handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=pageflip
    • > POST request to /wp-admin/admin-ajax.php
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the style-booklet handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=pageflip
    • > POST request to /wp-admin/admin-ajax.php
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the style-easy-pageflip handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=pageflip
    • > POST request to /wp-admin/admin-ajax.php
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the style-easy-pageflip-admin handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=pageflip
    • > POST request to /wp-admin/admin-ajax.php
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the style-epc-admin handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)

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
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/easy-page-flip/admin/assets/tinymce/chrEpf-tinymce-page.php
  • 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/easy-page-flip/includes/content-pageflip-list.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/easy-page-flip/includes/content-pageflip-single.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/easy-page-flip/includes/pageflip_meta_box.php:61
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/easy-page-flip/easy-pageflip.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/easy-page-flip/includes/custom_post_easy_pageflip.php:40

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
3 plugin tags: virtual magazine, list pageflip, pageflip

easy-page-flip/easy-pageflip.php 85% from 13 tests

The main PHP file in "Easy Page Flip" ver. 1.2.1.1 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("easy-page-flip.php" instead of "easy-pageflip.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 292 characters long)

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
Success! There were no dangerous files found in this plugin590 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP79265386
PO File125450089
CSS564187
JavaScript301828

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.21
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%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.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
6 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/assets/tinymce/icon.png17.34KB9.60KB▼ 44.66%
assets/images/shadow-top-forward.png2.78KB0.56KB▼ 79.70%
assets/images/icon-revista.png0.61KB0.68KB0.00%
admin/assets/tinymce/icon-magazine.png1.52KB0.83KB▼ 45.49%
assets/images/shadow.png5.42KB3.93KB▼ 27.43%