77% wp-responsive-slideshows

Code Review | WP Responsive Slideshows

WordPress plugin WP Responsive Slideshows scored77%from 54 tests.

About plugin

  • Plugin page: wp-responsive-sli...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-4.0
  • WordPress version: 6.3.1
  • First release: Oct 14, 2014
  • Latest release: Oct 16, 2014
  • Number of updates: 12
  • Update frequency: every 1.5 days
  • Top authors: sagarprince2012 (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

40+ active /2,412 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.13MB] [CPU: ▼0.85ms] Passed 4 tests

This is a short check of server-side resources used by WP Responsive Slideshows
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1638.84 ▲2.06
Dashboard /wp-admin3.46 ▲0.1649.55 ▲4.02
Posts /wp-admin/edit.php3.40 ▲0.0539.36 ▼6.35
Add New Post /wp-admin/post-new.php6.05 ▲0.1690.21 ▼3.12
Media Library /wp-admin/upload.php3.38 ▲0.1537.62 ▲4.36
All Slideshows /wp-admin/edit.php?post_type=wrs_slideshow3.4236.33
Add Slideshow /wp-admin/post-new.php?post_type=wrs_slideshow3.4241.77

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 29 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for WP Responsive Slideshows
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,851 ▲8013.27 ▼1.131.72 ▼0.1344.01 ▲4.14
Dashboard /wp-admin2,257 ▲654.86 ▼0.0599.74 ▼9.2840.22 ▼5.36
Posts /wp-admin/edit.php2,140 ▲512.04 ▲0.0238.63 ▲1.2938.54 ▲9.93
Add New Post /wp-admin/post-new.php1,584 ▲5618.72 ▲0.38606.31 ▼16.0649.40 ▲1.82
Media Library /wp-admin/upload.php1,433 ▲424.27 ▲0.0994.98 ▼2.5941.05 ▼2.23
All Slideshows /wp-admin/edit.php?post_type=wrs_slideshow1,1091.9230.6330.97
Add Slideshow /wp-admin/post-new.php?post_type=wrs_slideshow1,5533.6063.4138.26

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=wrs_slideshow
    • > Notice in wp-content/plugins/wp-responsive-slideshows/includes/class-wrs-admin-end.php+589
    Trying to access array offset on value of type bool

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
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-responsive-slideshows/index.php on line 29
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/wp-responsive-slideshows/index.php:29

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 75% 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 your attention:
  • Contributors: Please add at least on tag
  • Donate link: Please fix this invalid URI: ""
  • Contributors: The plugin contributors field is missing
  • Screenshots: These screenshots require images: #1 (Add New Slideshow Panel.), #2 (Add Slideshow Images Panel.), #3 (Add Slideshow Images By URL Panel.), #4 (Add Slideshow Videos Panel.), #5 (Add Slideshow Settings Panel.), #6 (Add Slideshow Shortcode Button on Posts and Pages WP Editor.), #7 (Add Slideshow Shortcode Panel.)
You can look at the official readme.txt

wp-responsive-slideshows/index.php 92% from 13 tests

The entry point to "WP Responsive Slideshows" version 1.0.0 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("wp-responsive-slideshows.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin4,351 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript45528972,561
PHP3169146783
SVG100504
CSS25112438
HTML43065

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity22.00
▷ Minimum class complexity3.00
▷ Maximum class complexity54.00
Average method complexity2.80
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes133.33%
Methods35
▷ Static methods00.00%
▷ Public methods35100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
9 PNG files occupy 0.20MB with 0.11MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/video_play.png4.86KB2.74KB▼ 43.61%
screenshot-5.png9.46KB4.68KB▼ 50.56%
screenshot-1.png44.67KB16.94KB▼ 62.08%
screenshot-7.png46.45KB18.00KB▼ 61.24%
screenshot-6.png18.74KB8.02KB▼ 57.19%