84% browser-shots

Code Review | Browser Screenshots

WordPress plugin Browser Screenshots scored84%from 54 tests.

About plugin

  • Plugin page: browser-shots
  • Plugin version: 1.7.7
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.2.0
  • WordPress version: 6.3.1
  • First release: Oct 15, 2012
  • Latest release: Mar 5, 2023
  • Number of updates: 49
  • Update frequency: every 77.5 days
  • Top authors: BinaryMoon (79.59%)kevinlearynet (22.45%)

Code review

54 tests

User reviews

19 reviews

Install metrics

5,000+ active /91,612 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼3.85ms] Passed 4 tests

An overview of server-side resources used by Browser Screenshots
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0641.11 ▲2.69
Dashboard /wp-admin3.36 ▲0.0152.27 ▼7.39
Posts /wp-admin/edit.php3.41 ▲0.0551.75 ▲6.43
Add New Post /wp-admin/post-new.php5.95 ▲0.0691.90 ▼9.62
Media Library /wp-admin/upload.php3.28 ▲0.0531.09 ▼1.06

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Browser Screenshots: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲3113.36 ▼1.081.76 ▼0.2642.76 ▲4.73
Dashboard /wp-admin2,203 ▲235.77 ▲0.84104.96 ▼2.3941.37 ▼3.96
Posts /wp-admin/edit.php2,089 ▲32.04 ▲0.0741.77 ▲3.6634.85 ▲0.17
Add New Post /wp-admin/post-new.php6,187 ▲4,65919.11 ▲0.91906.10 ▲294.3863.42 ▲16.37
Media Library /wp-admin/upload.php1,388 ▲34.21 ▼0.0894.59 ▼7.0840.43 ▼3.49

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • 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)
The smoke test was a success, however most plugin functionality was not tested

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 server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/browser-shots/browser-shots.php:47

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Tags: Please delete some tags, you are using 17 tag instead of maximum 10
The official readme.txt might help

browser-shots/browser-shots.php Passed 13 tests

"Browser Screenshots" version 1.7.7's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
64 characters long description:
Easily take dynamic screenshots of a website inside of WordPress

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
No dangerous file extensions were detected855 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript57352523
PHP4111148270
Sass319153
SVG1007
CSS2002

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 issues
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity14.00
▷ Minimum class complexity10.00
▷ Maximum class complexity18.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods13
▷ Static methods17.69%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/browsershots-icon.png0.95KB0.47KB▼ 50.57%