83% w2-slider

Code Review | W2 Slider

WordPress plugin W2 Slider scored83%from 54 tests.

About plugin

  • Plugin page: w2-slider
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.0
  • WordPress version: 6.3.1
  • First release: Nov 19, 2018
  • Latest release: Dec 8, 2018
  • Number of updates: 7
  • Update frequency: every 4.7 days
  • Top authors: daudul (100%)Mohammad Daudul Islam (28.57%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /629 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by W2 Slider
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0537.27 ▼6.30
Dashboard /wp-admin3.35 ▲0.0545.22 ▼9.18
Posts /wp-admin/edit.php3.40 ▲0.0450.09 ▲1.42
Add New Post /wp-admin/post-new.php5.93 ▲0.0493.98 ▲1.22
Media Library /wp-admin/upload.php3.27 ▲0.0434.79 ▼1.61
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=waters_plugin_slider3.2731.44
Add New /wp-admin/post-new.php?post_type=waters_plugin_slider3.4052.36
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=waters_plugin_slider3.2637.63
All Items /wp-admin/edit.php?post_type=waters_plugin_slider3.3238.84

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-posts
widget_recent-comments
category_children

Browser metrics Passed 4 tests

A check of browser resources used by W2 Slider
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,923 ▲16613.62 ▼0.675.24 ▲3.1941.05 ▼2.68
Dashboard /wp-admin2,238 ▲475.80 ▼0.0898.10 ▼15.3339.50 ▼7.78
Posts /wp-admin/edit.php2,124 ▲352.02 ▲0.0238.91 ▲5.8936.28 ▲1.20
Add New Post /wp-admin/post-new.php1,562 ▲2922.99 ▼0.41586.80 ▼82.9958.57 ▲2.89
Media Library /wp-admin/upload.php1,420 ▲294.19 ▼0.0295.91 ▼5.2041.00 ▼4.44
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=waters_plugin_slider1,3392.1429.6328.96
Add New /wp-admin/post-new.php?post_type=waters_plugin_slider2,3817.79174.7067.41
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=waters_plugin_slider1,4812.1427.1432.51
All Items /wp-admin/edit.php?post_type=waters_plugin_slider1,1431.9429.1029.17

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 were found after uninstall: 7 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • category_children
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options

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)
Even though everything seems fine, this is not an exhaustive test

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
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/w2-slider/waterwheel.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Screenshots: Screenshot #1 (This is screenshot Image1) image not found
Please take inspiration from this readme.txt

w2-slider/waterwheel.php 85% from 13 tests

"W2 Slider" version 1.0.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("w2-slider.php" instead of "waterwheel.php")

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
No dangerous file extensions were detected103 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP11913103

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.05
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.20
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin