94% react-webcam

Code Review | React Webcam

WordPress plugin React Webcam scored 94% from 54 tests.

About plugin

  • Plugin page: react-webcam
  • Plugin version: 1.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-4.7.2
  • WordPress version: 5.8.1
  • First release: Sep 9, 2015
  • Latest release: Apr 1, 2017
  • Number of updates: 54
  • Update frequency: every 10.6 days
  • Top authors: nikdo (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

700+ active / 7,193 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼143.24ms] Passed 4 tests

Server-side resources used by React Webcam
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.1335.35 ▲13.47
Dashboard /wp-admin3.08 ▲0.0245.63 ▼3.75
Posts /wp-admin/edit.php3.13 ▲0.0244.84 ▲1.44
Add New Post /wp-admin/post-new.php5.43 ▼0.0084.48 ▼575.01
Media Library /wp-admin/upload.php3.02 ▲0.0235.46 ▲4.37

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 4 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for React Webcam
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,689 ▲9315.86 ▲0.1712.22 ▲2.2847.09 ▼3.23
Dashboard /wp-admin2,967 ▲336.07 ▲0.10143.06 ▼0.41118.00 ▼3.37
Posts /wp-admin/edit.php2,739 ▼02.71 ▼0.0065.67 ▼2.3792.49 ▼1.31
Add New Post /wp-admin/post-new.php1,498 ▼18518.83 ▲0.28376.25 ▼10.42114.08 ▲2.21
Media Library /wp-admin/upload.php1,810 ▲35.03 ▼0.02145.02 ▲0.29118.53 ▼4.23

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however 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
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ReactWebcam\\add_action() in wp-content/plugins/react-webcam/react-webcam.php:73

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 Passed 29 tests

readme.txt Passed 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
3 plugin tags: image, ajax, webcam

react-webcam/react-webcam.php Passed 13 tests

The main file in "React Webcam" v. 1.2.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
55 characters long description:
Add auto-refreshing image from your webcam to any page.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected83 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP120850
JavaScript2101133

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.15
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
Namespaces1
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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants00.00%
▷ Class constants4100.00%
▷ Public constants4100.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