10% pet-webcam-widget

Code Review | Pet Webcam Widget

WordPress plugin Pet Webcam Widget scored 10% from 54 tests.

About plugin

  • Plugin page: pet-webcam-widget
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.5.3
  • WordPress version: 6.3.1
  • First release: Aug 3, 2016
  • Latest release: Aug 3, 2016
  • Number of updates: 6
  • Update frequency: every 0.2 days
  • Top authors: ko159 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,246 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
It is recommended to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/pet-webcam-widget/pet-webcam-widget.php+92
    Function create_function() is deprecated

Server metrics [RAM: ▼1.96MB] [CPU: ▼50.43ms] Passed 4 tests

This is a short check of server-side resources used by Pet Webcam Widget
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.434.61 ▼30.08
Dashboard /wp-admin2.05 ▼1.265.70 ▼40.77
Posts /wp-admin/edit.php2.05 ▼1.315.43 ▼43.32
Add New Post /wp-admin/post-new.php2.05 ▼3.845.94 ▼87.53
Media Library /wp-admin/upload.php2.05 ▼1.186.94 ▼26.93

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_pet_webcam_widget
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Pet Webcam Widget: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲1113.21 ▼0.061.74 ▲0.1543.95 ▲1.68
Dashboard /wp-admin2,206 ▼35.79 ▼0.0897.96 ▼9.7238.33 ▼2.62
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0333.59 ▼6.7234.34 ▼1.21
Add New Post /wp-admin/post-new.php1,538 ▲523.36 ▲0.17692.33 ▲27.1555.16 ▼0.62
Media Library /wp-admin/upload.php1,391 ▲34.09 ▼0.11107.81 ▲10.9046.90 ▼3.20

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/pet-webcam-widget/pet-webcam-widget.php+92
    Function create_function() is deprecated
  • Zombie WordPress options detected upon uninstall: 7 options
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_pet_webcam_widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/pet-webcam-widget/pet-webcam-widget.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Screenshots: Please add an image for screenshot #1 (To be added shortly)
The official readme.txt is a good inspiration

pet-webcam-widget/pet-webcam-widget.php 92% from 13 tests

"Pet Webcam Widget" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 166 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected59 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1142159

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.10
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
PNG images were not found in this plugin