66% wn-flipbox-pro

Code Review | WN Flipbox Pro

WordPress plugin WN Flipbox Pro scored66%from 54 tests.

About plugin

  • Plugin page: wn-flipbox-pro
  • Plugin version: 2.1
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.5.1
  • WordPress version: 6.3.1
  • First release: Jul 17, 2020
  • Latest release: Sep 24, 2020
  • Number of updates: 50
  • Update frequency: every 1.4 days
  • Top authors: yaidier (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /1,664 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼2.27ms] Passed 4 tests

Analyzing server-side resources used by WN Flipbox Pro
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0540.60 ▼4.42
Dashboard /wp-admin3.37 ▲0.0756.35 ▲6.66
Posts /wp-admin/edit.php3.49 ▲0.1456.92 ▲7.33
Add New Post /wp-admin/post-new.php5.96 ▲0.0787.53 ▼17.92
Media Library /wp-admin/upload.php3.28 ▲0.0540.06 ▲6.61
Settings /wp-admin/admin.php?page=wn_flipbox_settings3.2835.36
Main Page /wp-admin/admin.php?page=main_page5.8539.17
Save Handler /wp-admin/admin.php?page=wn_save_handler3.4832.60
WN Flipbox Pro /wp-admin/admin.php?page=wn_image_hover3.2836.02
Create New /wp-admin/admin.php?page=templates_selector5.6136.73

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

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

Browser metrics 75% from 4 tests

A check of browser resources used by WN Flipbox Pro
A great user experience is important, so you should focus on the following
  • Nodes: It is recommended to reduce the number of DOM nodes under 25,000 (currently 30,664 on /wp-admin/admin.php?page=wn_save_handler)
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,994 ▲24814.62 ▲0.291.70 ▼0.3342.76 ▼4.79
Dashboard /wp-admin2,403 ▲2126.43 ▲1.52123.16 ▲15.4996.44 ▲51.45
Posts /wp-admin/edit.php2,306 ▲2173.51 ▲1.4750.40 ▲13.6366.98 ▲33.35
Add New Post /wp-admin/post-new.php1,562 ▲3317.48 ▼0.82665.96 ▲2.7042.30 ▼7.80
Media Library /wp-admin/upload.php1,439 ▲484.14 ▼0.0986.39 ▼18.4882.38 ▲39.46
Settings /wp-admin/admin.php?page=wn_flipbox_settings1,1093.0945.6979.48
Main Page /wp-admin/admin.php?page=main_page29,8402.9567.9945.04
Save Handler /wp-admin/admin.php?page=wn_save_handler30,6644.2778.5140.59
WN Flipbox Pro /wp-admin/admin.php?page=wn_image_hover1,1043.2456.9533.89
Create New /wp-admin/admin.php?page=templates_selector3,65810.38202.46244.83

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 0% 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)
These server-side errors were triggered
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=templates_selector
    • > Notice in wp-content/plugins/wn-flipbox-pro/templates/header.php+188
    Undefined variable: pro
  • 15 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wn_save_handler
    • > Notice in wp-content/plugins/wn-flipbox-pro/templates/wn_ih_admin.php+5992
    Trying to access array offset on value of type bool
  • 1638 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wn_save_handler
    • > Notice in wp-content/plugins/wn-flipbox-pro/templates/wn_ih_admin.php+5971
    Trying to access array offset on value of type null
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wn_save_handler
    • > Warning in wp-content/plugins/wn-flipbox-pro/templates/wn_ih_admin.php+4899
    Invalid argument supplied for foreach()

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 take a closer look at the following
  • 3× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/wn-flipbox-pro/templates/insert_flipbox.php
    • > /wp-content/plugins/wn-flipbox-pro/templates/notification.php
    • > /wp-content/plugins/wn-flipbox-pro/templates/image_picker.php
  • 28× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/wn-flipbox-pro/templates/barra_slider_con_input_number.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function barra_slider_con_input_number() in wp-content/plugins/wn-flipbox-pro/templates/entire_icon_section.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wn-flipbox-pro/templates/wn_ih_admin.php:4252
    • > PHP Notice
      Undefined variable: reemplaza_aqui in wp-content/plugins/wn-flipbox-pro/templates/image_picker.php on line 17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function color_picker() in wp-content/plugins/wn-flipbox-pro/templates/box_shadow_section.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Elementor\\get_option() in wp-content/plugins/wn-flipbox-pro/assets/elementor-widget/wn-flipbox-pro-widget.php:10
    • > PHP Notice
      Undefined variable: default_url in wp-content/plugins/wn-flipbox-pro/templates/image_picker.php on line 9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wn-flipbox-pro/templates/output.php:3
    • > PHP Notice
      Undefined variable: label in wp-content/plugins/wn-flipbox-pro/templates/image_picker.php on line 6
    • > PHP Warning
      Use of undefined constant WIRENOMADS_FLIPBOX_URL - assumed 'WIRENOMADS_FLIPBOX_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/wn-flipbox-pro/templates/header.php on line 165

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
These are user-side errors you should fix
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wn_save_handler
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1 1:28609 "jQuery.Deferred exception: Cannot read properties of null (reading 'margin_type_of_selector')" "TypeError: Cannot read properties of null (reading 'margin_type_of_selector')\n at input_four_elemnents (/wp-content/plugins/wn-flipbox-pro/js/admin_section.js?ver=2.1:2115:24)\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/wn-flipbox-pro/js/admin_section.js?ver=2.1:55:3)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1:2:27292)" undefined
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wn_save_handler
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1 1:28721 Uncaught TypeError: Cannot read properties of null (reading 'margin_type_of_selector')

Optimizations

Plugin configuration 93% 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:
  • Screenshots: These screenshots lack descriptions #1, #2, #3, #4, #5, #6, #7, #8 in wn-flipbox-pro/assets to your readme.txt
The official readme.txt is a good inspiration

wn-flipbox-pro/wn-flipbox-pro.php 92% from 13 tests

The main file in "WN Flipbox Pro" v. 2.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 151 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected19,875 lines of code in 30 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript36101968,123
PHP221,0602807,575
CSS2610514,122
SVG30155

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity5.33
▷ Minimum class complexity2.00
▷ Maximum class complexity12.00
Average method complexity1.46
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods29
▷ Static methods13.45%
▷ Public methods2586.21%
▷ Protected methods413.79%
▷ Private methods00.00%
Functions24
▷ Named functions2395.83%
▷ Anonymous functions14.17%
Constants3
▷ Global constants3100.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
2 PNG files occupy 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/movil.png38.19KB9.04KB▼ 76.33%
images/flipbox_wirenomads.png10.15KB6.04KB▼ 40.55%