72% fwd-slider

Code Review | FWD Slider

WordPress plugin FWD Slider scored72%from 54 tests.

About plugin

  • Plugin page: fwd-slider
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.5.2
  • WordPress version: 6.3.1
  • First release: Jul 9, 2013
  • Latest release: Jul 9, 2013
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: Anil Jailta (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,234 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼4.23ms] Passed 4 tests

An overview of server-side resources used by FWD Slider
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0247.91 ▲9.11
Dashboard /wp-admin3.32 ▲0.0247.12 ▼3.64
Posts /wp-admin/edit.php3.37 ▲0.0249.56 ▲3.32
Add New Post /wp-admin/post-new.php5.90 ▲0.0286.92 ▼15.57
Media Library /wp-admin/upload.php3.24 ▲0.0235.50 ▼1.02
FWD Slider /wp-admin/admin.php?page=slide_me3.2632.63
add new /wp-admin/admin.php?page=add_new3.2534.00
Setting /wp-admin/admin.php?page=slide_set3.2428.72

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 28 new files
Database: 1 new table, 6 new options
New tables
wp_fwds_plugin
New WordPress options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-posts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for FWD Slider
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,931 ▲17013.40 ▼1.238.53 ▲6.0947.77 ▲2.59
Dashboard /wp-admin2,225 ▲515.66 ▼0.0081.61 ▼12.8070.98 ▲28.38
Posts /wp-admin/edit.php2,136 ▲362.00 ▲0.0333.68 ▼5.4934.03 ▼4.53
Add New Post /wp-admin/post-new.php1,566 ▲4023.25 ▼0.08667.77 ▼0.90111.04 ▲49.31
Media Library /wp-admin/upload.php1,424 ▲244.12 ▼0.11114.05 ▲18.8885.54 ▲44.73
FWD Slider /wp-admin/admin.php?page=slide_me1,0841.8439.4680.70
add new /wp-admin/admin.php?page=add_new9531.6824.3037.26
Setting /wp-admin/admin.php?page=slide_set9371.9924.9931.96

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=slide_me
    • > Notice in wp-content/plugins/fwd-slider/pages/fwds_show.php+40
    Undefined index: pagenum
    • > GET request to /wp-admin/admin.php?page=slide_me
    • > Notice in wp-content/plugins/fwd-slider/pages/fwds_show.php+131
    Undefined index: fwds_type

SRP 50% 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
  • 11× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_bloginfo() in wp-content/plugins/fwd-slider/pages/fwds_edit.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/fwd-slider/pages/fwds_add.php:54
    • > PHP Warning
      Use of undefined constant WP_fwds_TITLE - assumed 'WP_fwds_TITLE' (this will throw an Error in a future version of PHP) in wp-content/plugins/fwd-slider/pages/fwds_show.php on line 16
    • > PHP Warning
      Use of undefined constant WP_fwds_TITLE - assumed 'WP_fwds_TITLE' (this will throw an Error in a future version of PHP) in wp-content/plugins/fwd-slider/pages/fwds_set.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/fwd-slider/pages/fwds_info.php:88
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/fwd-slider/fwd_slider.php on line 10
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/fwd-slider/fwd_slider.php on line 11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/fwd-slider/pages/fwds_show.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/fwd-slider/pages/fwds_set.php:29
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/fwd-slider/fwd_slider.php:65

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following user-side errors
    • > GET request to /wp-admin/admin.php?page=slide_me
    • > Network (severe)
    wp-content/plugins/fwd-slider/css/img/btns-next-prev.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=slide_me
    • > Network (severe)
    wp-content/plugins/fwd-slider/css/img/pagination.png - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Screenshots: Please add images for these screenshots: #1 (backend showing preview of generated sliders), #2 (Page for entering multiple images to slider type just by clicking on add more images), #3 (sliders display on front-end), #4 (setting page where you can control your height width and rotation speed)
You can look at the official readme.txt

fwd-slider/fwd_slider.php 92% from 13 tests

The primary PHP file in "FWD Slider" version 1.0 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("fwd-slider.php" instead of "fwd_slider.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin2,765 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
CSS371811,821
PHP614510647
SVG100284
JavaScript31913

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.13
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%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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.27MB with 0.14MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/logo.png0.77KB0.82KB0.00%
Screenshot-3.png23.17KB6.97KB▼ 69.91%
Screenshot-4.png95.49KB35.53KB▼ 62.79%
Screenshot-1.png111.06KB37.29KB▼ 66.43%
Screenshot-2.png47.13KB17.84KB▼ 62.14%