10% camera-slideshow

Code Review | Camera slideshow

WordPress plugin Camera slideshow scored 10% from 54 tests.

About plugin

  • Plugin page: camera-slideshow
  • Plugin version: 1.4.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-4.0.0
  • WordPress version: 5.9.2
  • First release: Feb 22, 2012
  • Latest release: Sep 22, 2014
  • Number of updates: 81
  • Update frequency: every 13.9 days
  • Top authors: manuelmasia (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

1,000+ active / 62,791 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Please fix the following installer errors
  • Install procedure had errors
    • > Notice in wp-content/plugins/camera-slideshow/lib/camera_functions.php+36
    Trying to access array offset on value of type null

Server metrics [RAM: ▲0.66MB] [CPU: ▼289.67ms] Passed 4 tests

Server-side resources used by Camera slideshow
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.24 ▲0.7372.02 ▼5.16
Dashboard /wp-admin4.09 ▲0.6854.41 ▲19.11
Posts /wp-admin/edit.php4.31 ▲0.6854.92 ▲16.98
Add New Post /wp-admin/post-new.php7.56 ▲0.60110.51 ▼1,189.62
Media Library /wp-admin/upload.php3.97 ▲0.6846.56 ▲20.11
Add/remove slideshows /wp-admin/admin.php?page=camera_addremove3.9646.57
Manage your slideshows /wp-admin/admin.php?page=camera_manage3.9694.72
Dynamic slideshows /wp-admin/admin.php?page=camera_dynamic3.9340.49
Camera /wp-admin/admin.php?page=camera_general3.9640.45
Documentation /wp-admin/admin.php?page=camera_documentation3.9740.49
Settings /wp-admin/admin.php?page=camera_settings3.9675.43

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 119 new files
Database: 1 new table, no new options
New tables
wp_camera

Browser metrics Passed 4 tests

Checking browser requirements for Camera slideshow
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,846 ▲9215.54 ▲0.387.02 ▲0.652.57 ▼0.36
Dashboard /wp-admin2,949 ▲927.00 ▲0.87122.88 ▼8.11172.62 ▲9.29
Posts /wp-admin/edit.php2,763 ▲1063.35 ▲0.1266.63 ▲1.70166.89 ▲24.25
Add New Post /wp-admin/post-new.php1,816 ▲10521.89 ▲0.72459.20 ▲8.32197.99 ▼4.93
Media Library /wp-admin/upload.php1,767 ▲755.98 ▲0.51130.07 ▼20.37212.42 ▼4.09
Add/remove slideshows /wp-admin/admin.php?page=camera_addremove1,2413.6879.52113.71
Manage your slideshows /wp-admin/admin.php?page=camera_manage1,2303.6678.3693.39
Dynamic slideshows /wp-admin/admin.php?page=camera_dynamic3,9353.69105.16163.09
Camera /wp-admin/admin.php?page=camera_general1,3693.7379.20159.40
Documentation /wp-admin/admin.php?page=camera_documentation2,3293.6970.06161.11
Settings /wp-admin/admin.php?page=camera_settings2,0463.7869.13232.28

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
You still need to fix the following
  • Zombie tables were found after uninstall: 1 table
    • wp_camera

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These errors were triggered by the plugin
  • 134 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=camera_dynamic
    • > Notice in wp-content/plugins/camera-slideshow/lib/admin/camera_dynamicslideshows.php+942
    Undefined index: slideshow
    • > GET request to /wp-admin/admin.php?page=camera_dynamic
    • > Notice in wp-content/plugins/camera-slideshow/lib/camera_functions.php+36
    Trying to access array offset on value of type null
  • 67 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=camera_dynamic
    • > Notice in wp-content/plugins/camera-slideshow/lib/admin/camera_dynamicslideshows.php+662
    Trying to access array offset on value of type bool

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/camera-slideshow/index.php:13
    • > 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/camera-slideshow/index.php on line 13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/camera-slideshow/lib/camera_menu.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_types() in wp-content/plugins/camera-slideshow/lib/camera_admin.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function camera_get_option() in wp-content/plugins/camera-slideshow/lib/meta/camera_meta.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/camera-slideshow/lib/camera_functions.php:8

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
These are user-side errors you should fix
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=camera_settings
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,thickbox,farbtastic&ver=5.9.2 1:31592 "jQuery.Deferred exception: jQuery(...).live is not a function" "TypeError: jQuery(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/camera-slideshow/scripts/camera.admin.js?ver=5.9.2:9:26)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,thickbox,farbtastic&ver=5.9.2:2:30038)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,thickbox,farbtastic&ver=5.9.2:2:30340)" undefined
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=camera_settings
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,thickbox,farbtastic&ver=5.9.2 1:31592 "jQuery.Deferred exception: jQuery(...).live is not a function" "TypeError: jQuery(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/camera-slideshow/scripts/camera.admin.js?ver=5.9.2:70:25)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,thickbox,farbtastic&ver=5.9.2:2:30038)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,thickbox,farbtastic&ver=5.9.2:2:30340)" undefined
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=camera_settings
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,thickbox,farbtastic&ver=5.9.2 1:31592 "jQuery.Deferred exception: jQuery(...).live is not a function" "TypeError: jQuery(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/camera-slideshow/scripts/camera.admin.js?ver=5.9.2:98:37)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,thickbox,farbtastic&ver=5.9.2:2:30038)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,thickbox,farbtastic&ver=5.9.2:2:30340)" undefined
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=camera_settings
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,thickbox,farbtastic&ver=5.9.2 1:31592 "jQuery.Deferred exception: jQuery(...).live is not a function" "TypeError: jQuery(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/camera-slideshow/scripts/camera.admin.js?ver=5.9.2:341:61)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,thickbox,farbtastic&ver=5.9.2:2:30038)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,thickbox,farbtastic&ver=5.9.2:2:30340)" undefined
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=camera_settings
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,thickbox,farbtastic&ver=5.9.2 1:31592 "jQuery.Deferred exception: jQuery(...).live is not a function" "TypeError: jQuery(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/camera-slideshow/scripts/camera.admin.js?ver=5.9.2:412:30)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,thickbox,farbtastic&ver=5.9.2:2:30038)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,thickbox,farbtastic&ver=5.9.2:2:30340)" undefined
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=camera_settings
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,thickbox,farbtastic&ver=5.9.2 1:31592 "jQuery.Deferred exception: jQuery(...).live is not a function" "TypeError: jQuery(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/camera-slideshow/scripts/camera.admin.js?ver=5.9.2:435:33)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,thickbox,farbtastic&ver=5.9.2:2:30038)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,thickbox,farbtastic&ver=5.9.2:2:30340)" undefined
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=camera_settings
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,thickbox,farbtastic&ver=5.9.2 1:31592 "jQuery.Deferred exception: jQuery(...).live is not a function" "TypeError: jQuery(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/camera-slideshow/scripts/camera.admin.js?ver=5.9.2:823:34)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,thickbox,farbtastic&ver=5.9.2:2:30038)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,thickbox,farbtastic&ver=5.9.2:2:30340)" undefined
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=camera_settings
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,thickbox,farbtastic&ver=5.9.2 1:31592 "jQuery.Deferred exception: Cannot read properties of undefined (reading 'msie')" "TypeError: Cannot read properties of undefined (reading 'msie')\n at fakeSelect (/wp-content/plugins/camera-slideshow/scripts/camera.admin.js?ver=5.9.2:894:23)\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/camera-slideshow/scripts/camera.admin.js?ver=5.9.2:923:2)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,thickbox,farbtastic&ver=5.9.2:2:30038)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,thickbox,farbtastic&ver=5.9.2:2:30340)" undefined
  • 42 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=camera_settings
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,thickbox,farbtastic&ver=5.9.2 1:31702 Uncaught TypeError: jQuery(...).live is not a function
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=camera_settings
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,thickbox,farbtastic&ver=5.9.2 1:31702 Uncaught TypeError: Cannot read properties of undefined (reading 'msie')

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Please add images for these screenshots: #1 (Camera admin panel), #2 (Camera admin panel (2))
The official readme.txt is a good inspiration

camera-slideshow/index.php 92% from 13 tests

The entry point to "Camera slideshow" version 1.4.0.1 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("camera-slideshow.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 plugin13,826 lines of code in 62 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript196265056,114
PHP146862484,507
CSS121601713,188
XML170017

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.65
Average class complexity205.00
▷ Minimum class complexity205.00
▷ Maximum class complexity205.00
Average method complexity6.83
▷ Minimum method complexity1.00
▷ Maximum method complexity65.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods70
▷ Static methods68.57%
▷ Public methods1014.29%
▷ Protected methods6085.71%
▷ Private methods00.00%
Functions55
▷ Named functions55100.00%
▷ Anonymous functions00.00%
Constants93
▷ Global constants93100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
45 PNG files occupy 0.10MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/images/select_grid.png1.70KB0.62KB▼ 63.48%
css/images/menu_icon.png1.55KB0.76KB▼ 50.85%
css/colorBox1/images/controls.png1.22KB1.27KB0.00%
css/images/overlay10.png0.90KB0.10KB▼ 88.73%
css/colorBox4/images/ie6/borderTopRight.png0.45KB0.53KB0.00%