78% frontpage-slider

Code Review | Frontpage Slider

WordPress plugin Frontpage Slider scored78%from 54 tests.

About plugin

  • Plugin page: frontpage-slider
  • Plugin version: 0.1.5
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.1.1
  • WordPress version: 6.3.1
  • First release: Oct 27, 2021
  • Latest release: Mar 1, 2023
  • Number of updates: 10
  • Update frequency: every 49.1 days
  • Top authors: milkan2002 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /498 total downloads

Benchmarks

Plugin footprint 83% 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: ▲0.16MB] [CPU: ▼2.74ms] Passed 4 tests

Analyzing server-side resources used by Frontpage Slider
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1642.69 ▼12.13
Dashboard /wp-admin3.46 ▲0.1645.22 ▲0.98
Posts /wp-admin/edit.php3.57 ▲0.2250.27 ▲3.16
Add New Post /wp-admin/post-new.php6.04 ▲0.1694.12 ▼2.95
Media Library /wp-admin/upload.php3.38 ▲0.1536.45 ▲5.65
Show All Sliders /wp-admin/edit.php?post_type=fp_images3.4334.95
FrontPage Sliders /wp-admin/admin.php?page=my-top-level-handle3.3530.49

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Frontpage Slider
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,887 ▲14113.87 ▼0.788.68 ▲6.8637.33 ▼8.82
Dashboard /wp-admin2,232 ▲415.88 ▲0.0098.89 ▲1.6937.57 ▼2.90
Posts /wp-admin/edit.php2,115 ▲232.00 ▼0.0139.33 ▲3.3338.28 ▲3.18
Add New Post /wp-admin/post-new.php1,568 ▲4018.33 ▼0.03609.11 ▼51.5565.24 ▲2.15
Media Library /wp-admin/upload.php1,414 ▲234.19 ▼0.0495.75 ▼3.8242.31 ▼3.55
Show All Sliders /wp-admin/edit.php?post_type=fp_images1,0871.9831.9029.78
FrontPage Sliders /wp-admin/admin.php?page=my-top-level-handle7802.0525.7725.97

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/frontpage-slider/frontpage-slider.php
    • > /wp-content/plugins/frontpage-slider/index.php
  • 18× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Warning
      include_once(): Failed opening 'FPSL_DIRtemplates/bannerSlider/bannerSlider_metaB.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/frontpage-slider/templates/bannerSlider/bannerSlider.php on line 22
    • > PHP Warning
      Use of undefined constant FPSL_DIR - assumed 'FPSL_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/frontpage-slider/templates/headerSlider/headerSlider.php on line 22
    • > PHP Warning
      Use of undefined constant FPSL_DIR - assumed 'FPSL_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/frontpage-slider/templates/bannerSlider/bannerSlider.php on line 20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _x() in wp-content/plugins/frontpage-slider/inc/post-types.php:5
    • > PHP Warning
      include_once(): Failed opening 'FPSL_DIRtemplates/headerSlider/slider-section.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/frontpage-slider/templates/headerSlider/headerSlider.php on line 22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/frontpage-slider/inc/metaboxes/slider_meta_box.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/frontpage-slider/templates/bannerSlider/bannerSlider_metaB.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/frontpage-slider/templates/headerSlider/headerSlider_metaB.php:14
    • > PHP Warning
      include_once(): Failed opening 'FPSL_DIRtemplates/bannerSlider/slider-section.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/frontpage-slider/templates/bannerSlider/bannerSlider.php on line 20
    • > PHP Warning
      Use of undefined constant FPSL_DIR - assumed 'FPSL_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/frontpage-slider/templates/bannerSlider/bannerSlider.php on line 22

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
9 plugin tags: frontpage slider, image slider, js slider, slider, wordpress slider...

frontpage-slider/frontpage-slider.php Passed 13 tests

Analyzing the main PHP file in "Frontpage Slider" version 0.1.5
79 characters long description:
FrontPage slider has predesignated templates that you can use inside your theme

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin1,948 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript471146706
PHP12156142668
CSS21713574

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity11.75
▷ Minimum class complexity7.00
▷ Maximum class complexity15.00
Average method complexity2.72
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods25
▷ Static methods00.00%
▷ Public methods25100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
6 PNG files occupy 3.85MB with 2.51MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png2,047.58KB516.66KB▼ 74.77%
screenshot-3.png1,236.20KB333.32KB▼ 73.04%
screenshot-2.png377.91KB88.87KB▼ 76.48%
screenshot-4.png233.92KB84.41KB▼ 63.91%
screenshot-5.png17.40KB10.88KB▼ 37.49%