82% wp-flexslider-shortcodes

Code Review | WP Flexslider Shortcodes

WordPress plugin WP Flexslider Shortcodes scored 82% from 54 tests.

About plugin

  • Plugin page: wp-flexslider-sho...
  • Plugin version: 2.1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.4.0
  • WordPress version: 5.8.1
  • First release: Jan 25, 2016
  • Latest release: Apr 24, 2020
  • Number of updates: 10
  • Update frequency: every 155.3 days
  • Top authors: pcservice-voll (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 2,749 total downloads

Benchmarks

Plugin footprint Passed 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: ▲0.05MB] [CPU: ▼147.46ms] Passed 4 tests

An overview of server-side resources used by WP Flexslider Shortcodes
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.89 ▲0.0634.25 ▼6.26
Dashboard /wp-admin3.11 ▲0.0649.01 ▼5.83
Posts /wp-admin/edit.php3.23 ▲0.1244.30 ▼8.62
Add New Post /wp-admin/post-new.php5.48 ▲0.0595.56 ▼560.19
Media Library /wp-admin/upload.php3.06 ▲0.0539.56 ▼14.77
WP Flexslider Hilfe /wp-admin/plugins.php?page=wp_flexslider_shortcodes3.0329.24

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 99 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for WP Flexslider Shortcodes
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,825 ▲22916.67 ▲1.2215.21 ▲6.6648.45 ▼11.43
Dashboard /wp-admin2,976 ▲466.06 ▼0.05145.55 ▼30.58110.24 ▼24.94
Posts /wp-admin/edit.php2,748 ▲92.69 ▼0.0070.18 ▼8.8194.55 ▼12.46
Add New Post /wp-admin/post-new.php1,690 ▲715.93 ▼0.32401.45 ▼20.04116.67 ▼13.87
Media Library /wp-admin/upload.php1,757 ▼505.04 ▲0.03189.29 ▲23.30161.94 ▲33.68
WP Flexslider Hilfe /wp-admin/plugins.php?page=wp_flexslider_shortcodes1,3212.0860.7795.51

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
This plugin's uninstaller ran successfully

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/wp-flexslider-shortcodes/public/partials/wp-flexslider-public-display.php
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/wp-flexslider-shortcodes/admin/partials/wp-flexslider-admin-display.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-flexslider-shortcodes/plugin_options_old.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-flexslider-shortcodes/plugin_options.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-flexslider-shortcodes/wp_flexslider_shortcodes.php:40
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-flexslider-shortcodes/plugin-options.php:3

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following browser errors
    • > GET request to /wp-admin/plugins.php?page=wp_flexslider_shortcodes
    • > Network (severe)
    wp-content/plugins/wp_flexslider_shortcodes/admin/images/slider-basic.PNG - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/plugins.php?page=wp_flexslider_shortcodes
    • > Network (severe)
    wp-content/plugins/wp_flexslider_shortcodes/admin/images/wp-gallery.PNG - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/plugins.php?page=wp_flexslider_shortcodes
    • > Network (severe)
    wp-content/plugins/wp_flexslider_shortcodes/admin/images/wp-gallary-shortcode.PNG - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots do not have images: #1 (Basic Slider), #2 (Custom Navigation Slider), #3 (Slider with Caption), #4 (Thumbnails Slider), #5 (Scrollable Thumbnails), #6 (Settings Page)
You can take inspiration from this readme.txt

wp-flexslider-shortcodes/wp-flexslider.php 85% from 13 tests

The main file in "WP Flexslider Shortcodes" v. 2.1.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wp-flexslider-shortcodes.php" instead of "wp-flexslider.php")
  • Text Domain: The text domain should only use lowercase characters and dashes

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected6,814 lines of code in 57 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript173104522,191
HTML11189501,366
SVG5001,271
PHP15231623815
CSS565107759
LESS120873251
Markdown31000161

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity1.57
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.15
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods28
▷ Static methods27.14%
▷ Public methods2382.14%
▷ Protected methods00.00%
▷ Private methods517.86%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
11 PNG files occupy 2.26MB with 1.50MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
image/wp-gallary-shortcode-visuell.PNG253.23KB64.49KB▼ 74.53%
admin/images/wp-gallery.PNG392.29KB99.23KB▼ 74.70%
image/slider-basic.PNG484.08KB133.92KB▼ 72.33%
woothemes-FlexSlider-8b3766e/demo/images/logo.png3.49KB2.21KB▼ 36.76%
admin/images/slider-basic.PNG484.08KB133.92KB▼ 72.33%