77% smugmug-responsive-slider

Code Review | SmugMug Responsive Slider

WordPress plugin SmugMug Responsive Slider scored 77% from 54 tests.

About plugin

  • Plugin page: smugmug-responsiv...
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.7
  • WordPress version: 6.3.1
  • First release: Jul 27, 2012
  • Latest release: Dec 16, 2016
  • Number of updates: 14
  • Update frequency: every 114.7 days
  • Top authors: mgyura (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

100+ active / 7,465 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.30MB] [CPU: ▼2.31ms] 75% from 4 tests

This is a short check of server-side resources used by SmugMug Responsive Slider
Please have a look at the following items
  • CPU: Try to keep total CPU usage under 500.00ms (currently 724.08ms on /wp-admin/options-general.php?page=smugmug-settings)
PageMemory (MB)CPU Time (ms)
Home /3.76 ▲0.2942.13 ▲0.17
Dashboard /wp-admin3.65 ▲0.3548.62 ▲3.06
Posts /wp-admin/edit.php3.70 ▲0.3447.31 ▼2.23
Add New Post /wp-admin/post-new.php6.17 ▲0.2896.26 ▼10.25
Media Library /wp-admin/upload.php3.51 ▲0.2837.99 ▲3.92
SmugMug Slider /wp-admin/options-general.php?page=smugmug-settings3.48724.08

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 27 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
pyd_smug_slider
widget_recent-posts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

SmugMug Responsive Slider: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,838 ▲9214.47 ▲0.072.02 ▲0.3141.19 ▲1.39
Dashboard /wp-admin2,216 ▲275.83 ▲0.8895.51 ▼28.3840.13 ▼4.33
Posts /wp-admin/edit.php2,101 ▲121.99 ▼0.0337.59 ▼1.4333.21 ▼1.12
Add New Post /wp-admin/post-new.php1,540 ▲723.31 ▼0.04652.15 ▲35.8461.69 ▲10.39
Media Library /wp-admin/upload.php1,395 ▲44.24 ▲0.0595.94 ▼1.2742.65 ▲1.47
SmugMug Slider /wp-admin/options-general.php?page=smugmug-settings7862.0325.2425.79

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=smugmug-settings
    • > Notice in wp-content/plugins/smugmug-responsive-slider/includes/lib/phpSmug/phpSmug.php+410
    unserialize(): Error at offset 0 of 30995 bytes
    • > GET request to /wp-admin/options-general.php?page=smugmug-settings
    • > Notice in wp-content/plugins/smugmug-responsive-slider/includes/lib/phpSmug/phpSmug.php+411
    Trying to access array offset on value of type bool
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=smugmug-settings
    • > Notice in wp-content/plugins/smugmug-responsive-slider/includes/lib/phpSmug/phpSmug.php+762
    Undefined variable: output
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=smugmug-settings
    • > Notice in wp-content/plugins/smugmug-responsive-slider/includes/pyd-settings.php+375
    Trying to access array offset on value of type null
    • > GET request to /wp-admin/options-general.php?page=smugmug-settings
    • > Notice in wp-content/plugins/smugmug-responsive-slider/includes/lib/phpSmug/phpSmug.php+883
    Undefined offset: 1
    • > GET request to /wp-admin/options-general.php?page=smugmug-settings
    • > Notice in wp-content/plugins/smugmug-responsive-slider/includes/lib/phpSmug/phpSmug.php+478
    Undefined index: id
    • > GET request to /wp-admin/options-general.php?page=smugmug-settings
    • > Notice in wp-content/plugins/smugmug-responsive-slider/includes/lib/phpSmug/phpSmug.php+479
    Undefined index: Secret

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
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/smugmug-responsive-slider/includes/pyd-smug_shortcode.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/smugmug-responsive-slider/includes/pyd-settings.php:396
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/smugmug-responsive-slider/includes/pyd-settings.php:396

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: images, pictures, smugmug, smug mug, responsive slider

smugmug-responsive-slider/pyd-smugmug_slider.php 85% from 13 tests

The main PHP file in "SmugMug Responsive Slider" ver. 1.3 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Description: Please don't use more than 140 characters for the plugin description (currently 225 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("smugmug-responsive-slider.php" instead of "pyd-smugmug_slider.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
Good job! No executable or dangerous file extensions detected2,706 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP62846161,464
JavaScript389115729
XML860326
CSS24026187

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity25.29
▷ Minimum class complexity1.00
▷ Maximum class complexity103.00
Average method complexity4.40
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods53
▷ Static methods35.66%
▷ Public methods4483.02%
▷ Protected methods00.00%
▷ Private methods916.98%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
6 PNG files occupy 0.88MB with 0.49MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/lib/FlexSlider/theme/bg_control_nav.png1.73KB1.11KB▼ 36.20%
screenshot-2.png377.94KB109.50KB▼ 71.03%
screenshot-3.png148.97KB44.38KB▼ 70.21%
includes/lib/FlexSlider/theme/bg_direction_nav.png2.37KB1.33KB▼ 43.68%
screenshot-1.png288.83KB118.50KB▼ 58.97%