83% slider-by-webxapp

Code Review | Slider by webxapp - Responsive Image Slider for WordPress

WordPress plugin Slider by webxapp - Responsive Image Slider for WordPress scored83%from 54 tests.

About plugin

  • Plugin page: slider-by-webxapp
  • Plugin version: 1.2.0
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4.0-5.4
  • WordPress version: 6.3.1
  • First release: Dec 26, 2018
  • Latest release: Apr 21, 2020
  • Number of updates: 32
  • Update frequency: every 15.1 days
  • Top authors: webxapp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /11,432 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
Install script ran successfully

Server metrics [RAM: ▲0.11MB] [CPU: ▼0.17ms] Passed 4 tests

An overview of server-side resources used by Slider by webxapp - Responsive Image Slider for WordPress
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0845.66 ▲0.97
Dashboard /wp-admin3.43 ▲0.1353.12 ▼2.50
Posts /wp-admin/edit.php3.55 ▲0.1955.47 ▲2.43
Add New Post /wp-admin/post-new.php6.02 ▲0.1394.08 ▼1.56
Media Library /wp-admin/upload.php3.33 ▲0.1040.95 ▲7.42
Sliders /wp-admin/edit.php?post_type=wxas_slider3.4039.84
Add New Slider /wp-admin/post-new.php?post_type=wxas_slider3.4660.71
Themes /wp-admin/edit.php?post_type=wxas_themes3.4139.90

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 42 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Slider by webxapp - Responsive Image Slider for WordPress
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,133 ▲37214.96 ▲0.836.02 ▲4.2339.58 ▼4.54
Dashboard /wp-admin2,432 ▲2526.34 ▲0.69120.58 ▲31.3085.01 ▲40.66
Posts /wp-admin/edit.php2,372 ▲2723.68 ▲1.7354.48 ▲16.7876.51 ▲38.54
Add New Post /wp-admin/post-new.php1,771 ▲24524.31 ▲0.80592.57 ▼110.00174.35 ▲115.58
Media Library /wp-admin/upload.php1,515 ▲1154.22 ▼0.0488.18 ▼17.2782.70 ▲36.09
Sliders /wp-admin/edit.php?post_type=wxas_slider1,3393.5647.1569.18
Add New Slider /wp-admin/post-new.php?post_type=wxas_slider2,2643.8569.1357.24
Themes /wp-admin/edit.php?post_type=wxas_themes1,3513.3849.6680.18

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
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

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
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/slider-by-webxapp/includes/wxas_shortcode.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/slider-by-webxapp/admin/view/wxas_upload.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/slider-by-webxapp/admin/view/slide_settings.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_posts() in wp-content/plugins/slider-by-webxapp/admin/view/add_shortcode_view.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/slider-by-webxapp/admin/view/theme_metabox_view.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/slider-by-webxapp/wxas.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Tags: Please delete some tags, you are using 17 tag instead of maximum 10
  • Screenshots: Add images for these screenshots: #6 (Slider image metadata editing modal.), #7 (Easily select a slider to insert into your post or page.), #8 (The final result.)
You can take inspiration from this readme.txt

slider-by-webxapp/wxas.php 85% from 13 tests

The primary PHP file in "Slider by webxapp - Responsive Image Slider for WordPress" version 1.2.0 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("slider-by-webxapp.php" instead of "wxas.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
There were no executable files found in this plugin4,999 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript73852032,105
CSS6215441,741
PHP11113231,015
SVG311138

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity14.80
▷ Minimum class complexity2.00
▷ Maximum class complexity39.00
Average method complexity3.03
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods34
▷ Static methods1029.41%
▷ Public methods3191.18%
▷ Protected methods00.00%
▷ Private methods38.82%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
4 PNG files occupy 0.02MB with 0.00MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/wp-post_logo.png3.20KB2.54KB▼ 20.43%
assets/images/video_logo.png0.28KB0.28KB0.00%
assets/images/wxas_logo.png16.76KB8.06KB▼ 51.89%
assets/images/wxas_logo_small.png1.11KB1.13KB0.00%