84% featured-lyth-slide

Code Review | Featured Lyth Slide

WordPress plugin Featured Lyth Slide scored84%from 54 tests.

About plugin

  • Plugin page: featured-lyth-slide
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-4.8
  • WordPress version: 6.3.1
  • First release: Aug 25, 2017
  • Latest release: Aug 26, 2017
  • Number of updates: 7
  • Update frequency: every 0.3 days
  • Top authors: lythium92 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /780 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼2.40ms] Passed 4 tests

An overview of server-side resources used by Featured Lyth Slide
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.64 ▼4.82
Dashboard /wp-admin3.31 ▼0.0354.51 ▼11.02
Posts /wp-admin/edit.php3.37 ▲0.0151.19 ▲2.63
Add New Post /wp-admin/post-new.php5.92 ▲0.0397.71 ▲8.06
Media Library /wp-admin/upload.php3.24 ▲0.0139.71 ▲3.60

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 26 new files
Database: 1 new table, 6 new options
New tables
wp_LSlide_Config
New WordPress options
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

Featured Lyth Slide: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,917 ▲15613.57 ▼0.8014.07 ▲12.2947.84 ▲0.18
Dashboard /wp-admin2,215 ▲385.60 ▼0.0285.47 ▼17.6739.26 ▼6.29
Posts /wp-admin/edit.php2,120 ▲202.04 ▲0.0339.91 ▲3.0234.98 ▼2.08
Add New Post /wp-admin/post-new.php1,543 ▲1723.46 ▲5.76595.50 ▼67.9665.20 ▲8.02
Media Library /wp-admin/upload.php1,417 ▲144.33 ▲0.0499.27 ▼0.6445.32 ▲1.12

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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
Please fix the following
  • 6× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Notice
      Undefined variable: setting_speed in wp-content/plugins/featured-lyth-slide/view/view_front_slide.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_admin_page_title() in wp-content/plugins/featured-lyth-slide/view/view_back_resume.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/featured-lyth-slide/view/view_front_slide.php:48
    • > PHP Notice
      Undefined variable: recent_posts in wp-content/plugins/featured-lyth-slide/view/view_front_slide.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/featured-lyth-slide/LSlide_main.php:16
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/featured-lyth-slide/view/view_front_slide.php on line 5

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 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: slider, thumbnail, slide, featured post, rcent post

featured-lyth-slide/LSlide_main.php 92% from 13 tests

The entry point to "Featured Lyth Slide" version 1.1.1 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("featured-lyth-slide.php" instead of "LSlide_main.php")

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
No dangerous file extensions were detected1,150 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
CSS4401515
PHP72711482
JavaScript4131153

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity10.25
▷ Minimum class complexity1.00
▷ Maximum class complexity28.00
Average method complexity3.47
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods15
▷ Static methods746.67%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
view/img/arrowR.png1.63KB0.32KB▼ 80.35%
view/img/arrowL.png1.57KB0.40KB▼ 74.47%