83% rolo-slider

Code Review | Rolo Slider

WordPress plugin Rolo Slider scored 83% from 54 tests.

About plugin

  • Plugin page: rolo-slider
  • Plugin version: 1.0.9
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9.0-4.9.6
  • WordPress version: 6.3.1
  • First release: Sep 21, 2016
  • Latest release: Oct 9, 2018
  • Number of updates: 39
  • Update frequency: every 19.2 days
  • Top authors: pressfore (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

1,000+ active / 19,284 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲1.27MB] [CPU: ▲11.84ms] 75% from 4 tests

An overview of server-side resources used by Rolo Slider
It is recommended to improve the following
  • CPU: Try to keep total CPU usage under 500.00ms (currently 1,337.76ms on /wp-admin/edit.php?post_type=rolo_slider&page=demo-data)
PageMemory (MB)CPU Time (ms)
Home /4.68 ▲1.2250.06 ▲2.51
Dashboard /wp-admin4.59 ▲1.2963.45 ▲16.98
Posts /wp-admin/edit.php4.62 ▲1.2756.77 ▲8.04
Add New Post /wp-admin/post-new.php7.18 ▲1.30120.81 ▲21.61
Media Library /wp-admin/upload.php4.51 ▲1.2853.53 ▲19.81
Licenses /wp-admin/edit.php?post_type=rolo_slider&page=ed-licencing4.4343.30
Import /wp-admin/edit.php?post_type=rolo_slider&page=import4.4344.32
All Sliders /wp-admin/edit.php?post_type=rolo_slider4.5648.06
Demo Data /wp-admin/edit.php?post_type=rolo_slider&page=demo-data4.511,337.76
Addons /wp-admin/edit.php?post_type=rolo_slider&page=addons4.4342.28
About /wp-admin/edit.php?post_type=rolo_slider&page=about4.4351.43
Add Slider /wp-admin/post-new.php?post_type=rolo_slider4.9980.26
Export /wp-admin/edit.php?post_type=rolo_slider&page=export4.4343.71

Server storage [IO: ▲3.31MB] [DB: ▲0.01MB] Passed 3 tests

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 136 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Rolo Slider
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,887 ▲15213.36 ▼1.023.37 ▲1.4237.85 ▲0.23
Dashboard /wp-admin2,283 ▲955.03 ▲0.18101.69 ▼10.6336.34 ▼7.36
Posts /wp-admin/edit.php2,169 ▲802.29 ▲0.3041.86 ▲2.1935.02 ▼3.14
Add New Post /wp-admin/post-new.php1,591 ▲4818.56 ▼4.15625.18 ▼18.4650.80 ▼16.10
Media Library /wp-admin/upload.php1,468 ▲804.33 ▲0.0898.37 ▼6.7644.18 ▼3.56
Licenses /wp-admin/edit.php?post_type=rolo_slider&page=ed-licencing8982.2632.5231.63
Import /wp-admin/edit.php?post_type=rolo_slider&page=import9202.2334.8429.15
All Sliders /wp-admin/edit.php?post_type=rolo_slider1,1492.4535.9727.83
Demo Data /wp-admin/edit.php?post_type=rolo_slider&page=demo-data9092.2029.6139.28
Addons /wp-admin/edit.php?post_type=rolo_slider&page=addons1,0012.2030.8752.92
About /wp-admin/edit.php?post_type=rolo_slider&page=about1,0202.1931.8762.29
Add Slider /wp-admin/post-new.php?post_type=rolo_slider5,1525.49209.91125.19
Export /wp-admin/edit.php?post_type=rolo_slider&page=export8862.2329.5126.00

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

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
Please fix the following items
  • 21× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function PressforeExporter\\add_action() in wp-content/plugins/rolo-slider/demo/demo-data.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'RoloOptions\\Section' not found in wp-content/plugins/rolo-slider/options/sections/05.pagination.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/rolo-slider/cmb2/bootstrap.php:17
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/import.php' (include_path='.:/usr/share/php') in wp-content/plugins/rolo-slider/import/init.php on line 7
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/import.php): failed to open stream: No such file or directory in wp-content/plugins/rolo-slider/import/init.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/rolo-slider/pages/addons.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/rolo-slider/pages/dashboard.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function PressforeExporter\\add_action() in wp-content/plugins/rolo-slider/export/export-hooks.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/rolo-slider/core/color-field.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'RoloOptions\\Section' not found in wp-content/plugins/rolo-slider/options/sections/04.arrows.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Donate link: Invalid URI ("")
The official readme.txt is a good inspiration

rolo-slider/init.php 92% from 13 tests

The main PHP script in "Rolo Slider" version 1.0.9 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("rolo-slider.php" instead of "init.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected14,717 lines of code in 82 files:
LanguageFilesBlank linesComment linesLines of code
PHP561,7213,1136,766
CSS61,1981,1085,421
JavaScript82411441,168
Sass11168231,116
HTML1351246

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity22.30
▷ Minimum class complexity1.00
▷ Maximum class complexity144.00
Average method complexity3.37
▷ Minimum method complexity1.00
▷ Maximum method complexity50.00
Code structure
Namespaces6
Interfaces0
Traits0
Classes43
▷ Abstract classes12.33%
▷ Concrete classes4297.67%
▷ Final classes00.00%
Methods386
▷ Static methods4912.69%
▷ Public methods37296.37%
▷ Protected methods112.85%
▷ Private methods30.78%
Functions38
▷ Named functions38100.00%
▷ Anonymous functions00.00%
Constants11
▷ Global constants872.73%
▷ Class constants327.27%
▷ Public constants3100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
31 PNG files occupy 1.19MB with 0.65MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
cmb2/images/ui-bg_flat_75_ffffff_40x100.png0.17KB0.08KB▼ 51.12%
assets/images/default-layout.png5.87KB2.18KB▼ 62.93%
assets/images/v_0.4_trans_captions.png25.18KB10.84KB▼ 56.94%
assets/images/square.png0.44KB0.32KB▼ 28.16%
assets/images/06-rolo-new-feature-code.png61.87KB15.47KB▼ 75.00%