90% website-screenshot-to-media-library

Code Review | Website Screenshot to Media Library

WordPress plugin Website Screenshot to Media Library scored90%from 54 tests.

About plugin

  • Plugin page: website-screensho...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.1
  • WordPress version: 6.3.1
  • First release: Apr 2, 2023
  • Latest release: Apr 2, 2023
  • Number of updates: 2
  • Update frequency: every 9.5 days
  • Top authors: ranukah (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /160 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼9.16ms] Passed 4 tests

A check of server-side resources used by Website Screenshot to Media Library
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0342.86 ▼0.62
Dashboard /wp-admin3.34 ▼0.0050.25 ▼16.45
Posts /wp-admin/edit.php3.40 ▲0.0447.11 ▼0.11
Add New Post /wp-admin/post-new.php5.92 ▲0.0486.99 ▼17.28
Media Library /wp-admin/upload.php3.27 ▲0.0436.95 ▼2.30
Get Screenshot /wp-admin/admin.php?page=wsml-screenshot-get3.2337.15
Screenshot /wp-admin/admin.php?page=screenshot3.2333.50
Settings /wp-admin/admin.php?page=wsml-screenshot-settings3.2334.27

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Website Screenshot to Media Library
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲2614.17 ▼0.181.83 ▼0.0246.63 ▲3.79
Dashboard /wp-admin2,212 ▲355.61 ▼0.0796.36 ▲2.3041.25 ▼2.77
Posts /wp-admin/edit.php2,120 ▲202.05 ▲0.0537.20 ▼2.4133.71 ▼1.17
Add New Post /wp-admin/post-new.php1,545 ▲723.12 ▲0.13661.08 ▼97.5755.69 ▲1.69
Media Library /wp-admin/upload.php1,423 ▲234.18 ▼0.0697.47 ▼21.1042.43 ▼13.35
Get Screenshot /wp-admin/admin.php?page=wsml-screenshot-get8872.0030.7128.12
Screenshot /wp-admin/admin.php?page=screenshot8882.0328.1630.54
Settings /wp-admin/admin.php?page=wsml-screenshot-settings8842.0323.1830.45

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests Passed 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)
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

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
4 plugin tags: screenshot, screenshotone, images, visual content

website-screenshot-to-media-library/website-screenshot-to-media-library.php 92% from 13 tests

This is the main PHP file of "Website Screenshot to Media Library" 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 take the time to fix the following:
  • Domain Path: The domain path folder does not exist ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin191 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP22830191

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
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%
Functions6
▷ Named functions6100.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
2 PNG files occupy 0.18MB with 0.11MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-128x128.png10.87KB4.48KB▼ 58.75%
assets/banner-772x250.png171.26KB61.09KB▼ 64.33%