84% liferex-slider

Code Review | LifeRex Slider

WordPress plugin LifeRex Slider scored84%from 54 tests.

About plugin

  • Plugin page: liferex-slider
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.2
  • WordPress version: 6.3.1
  • First release: Jun 20, 2015
  • Latest release: Jun 21, 2015
  • Number of updates: 11
  • Update frequency: every 0.3 days
  • Top authors: kamruzzaman jibon (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /679 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.04MB] [CPU: ▼10.64ms] Passed 4 tests

A check of server-side resources used by LifeRex Slider
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0536.65 ▼13.62
Dashboard /wp-admin3.35 ▲0.0445.83 ▼12.04
Posts /wp-admin/edit.php3.39 ▲0.0449.18 ▼0.32
Add New Post /wp-admin/post-new.php5.93 ▲0.0485.20 ▼16.57
Media Library /wp-admin/upload.php3.26 ▲0.0439.81 ▲5.52
Slide Categories /wp-admin/edit-tags.php?taxonomy=slide_category&post_type=slider3.3535.96
Add New /wp-admin/post-new.php?post_type=slider3.3947.84
All Slides /wp-admin/edit.php?post_type=slider3.3134.36

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 35 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by LifeRex Slider
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,925 ▲17913.60 ▼0.787.68 ▲5.5340.40 ▼2.94
Dashboard /wp-admin2,237 ▲464.88 ▼1.03110.98 ▲9.1442.55 ▲3.98
Posts /wp-admin/edit.php2,123 ▲312.06 ▲0.0538.79 ▲2.4033.36 ▼1.71
Add New Post /wp-admin/post-new.php1,560 ▲1823.05 ▲4.82621.08 ▼14.6156.60 ▲5.11
Media Library /wp-admin/upload.php1,419 ▲314.21 ▼0.01100.94 ▼1.6642.97 ▼2.54
Slide Categories /wp-admin/edit-tags.php?taxonomy=slide_category&post_type=slider1,2622.1425.2928.05
Add New /wp-admin/post-new.php?post_type=slider2,4847.75169.9266.85
All Slides /wp-admin/edit.php?post_type=slider1,1011.9630.1028.19

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means 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
The following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/liferex-slider/shortcodes/shortcodes.php:67

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

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: images, wordpress slider, image slider, jquery slider, responsive

liferex-slider/liferex-image-slider.php 92% from 13 tests

"LifeRex Slider" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("liferex-slider.php" instead of "liferex-image-slider.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin1,472 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript17565522
CSS52350469
PHP1214795423
PO File1212358

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.12
Average class complexity2.57
▷ Minimum class complexity1.00
▷ Maximum class complexity9.00
Average method complexity1.37
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods30
▷ Static methods26.67%
▷ Public methods2583.33%
▷ Protected methods00.00%
▷ Private methods516.67%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
8 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/themes/default/arrows.png0.80KB0.51KB▼ 36.53%
public/themes/light/bullets.png3.21KB0.54KB▼ 83.24%
public/themes/default/bullets.png1.25KB1.08KB▼ 13.74%
public/themes/bar/arrows.png0.80KB0.51KB▼ 36.53%
public/themes/light/arrows.png3.17KB0.52KB▼ 83.49%