73% web-slider

Code Review | WebSlider

WordPress plugin WebSlider scored73%from 54 tests.

About plugin

  • Plugin page: web-slider
  • Plugin version: 1.0
  • PHP compatiblity: 7.2.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3.2-6.0
  • WordPress version: 6.3.1
  • First release: Aug 22, 2022
  • Latest release: Aug 22, 2022
  • Number of updates: 3
  • Update frequency: every 53.4 days
  • Top authors: techforceglobal (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /200 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.05MB] [CPU: ▼3.90ms] Passed 4 tests

An overview of server-side resources used by WebSlider
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0638.54 ▼2.80
Dashboard /wp-admin3.36 ▲0.0549.38 ▲0.15
Posts /wp-admin/edit.php3.41 ▲0.0448.62 ▲2.43
Add New Post /wp-admin/post-new.php5.95 ▲0.0679.37 ▼12.97
Media Library /wp-admin/upload.php3.28 ▲0.0434.91 ▲0.03

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 15 new files
Database: 1 new table, 6 new options
New tables
wp_slider
New WordPress options
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for WebSlider
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,937 ▲20214.11 ▼0.2611.11 ▲9.3345.30 ▼6.37
Dashboard /wp-admin2,217 ▲264.99 ▲0.09107.34 ▲4.0074.79 ▲31.02
Posts /wp-admin/edit.php2,121 ▲322.23 ▲0.2436.73 ▼1.3033.57 ▼0.62
Add New Post /wp-admin/post-new.php1,699 ▲16624.52 ▲1.20608.02 ▼57.9356.62 ▼1.09
Media Library /wp-admin/upload.php1,410 ▲224.16 ▼0.15100.35 ▼4.1169.63 ▲26.92

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_slider
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/web-slider/img_upload.php:122
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/web-slider/webslider.php:37
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/web-slider/img_upload.php on line 121

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% 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
Please fix the following attributes:
  • Donate link: Invalid url: "none"
You can take inspiration from this readme.txt

web-slider/webslider.php 77% from 13 tests

The primary PHP file in "WebSlider" version 1.0 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Domain Path: The domain path is invalid: folder "/languages" does not exist
  • Text Domain: The text domain name should consist of only dashes and lowercase characters
  • Main file name: The principal plugin file should be the same as the plugin slug ("web-slider.php" instead of "webslider.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,076 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP31636609
CSS41125465
JavaScript2092

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
No PNG images were found in this plugin