84% webcam-gallery-for-wp

Code Review | Webcam Gallery for WP

WordPress plugin Webcam Gallery for WP scored84%from 54 tests.

About plugin

  • Plugin page: webcam-gallery-fo...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 1.0-4.1
  • WordPress version: 6.3.1
  • First release: Oct 14, 2014
  • Latest release: Dec 22, 2014
  • Number of updates: 5
  • Update frequency: every 14.0 days
  • Top authors: imseosrl (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,083 total downloads

Benchmarks

Plugin footprint 83% 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.01MB] [CPU: ▼2.32ms] Passed 4 tests

Analyzing server-side resources used by Webcam Gallery for WP
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0338.37 ▲0.99
Dashboard /wp-admin3.32 ▲0.0144.76 ▼7.84
Posts /wp-admin/edit.php3.37 ▲0.0146.36 ▲2.16
Add New Post /wp-admin/post-new.php5.90 ▲0.0183.78 ▼4.60
Media Library /wp-admin/upload.php3.24 ▲0.0136.29 ▲2.92

Server storage [IO: ▲0.20MB] [DB: ▲0.07MB] Passed 3 tests

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 19 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Webcam Gallery for WP
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,896 ▲13513.54 ▼0.8121.45 ▲19.7637.44 ▼4.74
Dashboard /wp-admin2,207 ▲275.58 ▼0.0284.96 ▼9.9160.59 ▲18.49
Posts /wp-admin/edit.php2,118 ▲182.00 ▲0.0137.95 ▲1.6135.24 ▼1.98
Add New Post /wp-admin/post-new.php1,692 ▲16122.56 ▼0.53680.19 ▲11.7655.97 ▲5.34
Media Library /wp-admin/upload.php1,415 ▲124.08 ▼0.1199.30 ▼3.4570.68 ▲24.20

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
Please fix the following items
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/webcam-gallery-for-wp/functions.php:119
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/webcam-gallery-for-wp/admin.php:65
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/webcam-gallery-for-wp/functions.php:119

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: images, slideshow, gallery, webcam, thumbs

webcam-gallery-for-wp/index.php 92% from 13 tests

This is the main PHP file of "Webcam Gallery for WP" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("webcam-gallery-for-wp.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin356 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP57962250
CSS3273177
JavaScript2181129

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
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%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants19
▷ Global constants19100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
7 PNG files occupy 0.05MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
(invalid) media/img/wpcamgallery32.png1.78KB0.00KB▼ 100.00%
media/img/scrollable/arrow/hori_large.png2.46KB2.05KB▼ 16.80%
media/img/imseolab-b.png13.23KB7.53KB▼ 43.09%
media/img/imseo_logo_web.png24.07KB10.43KB▼ 56.64%
media/img/tooltip/black_arrow.png2.08KB2.57KB0.00%