90% browser-shots-carousel

Code Review | Browser Shots Carousel

WordPress plugin Browser Shots Carousel scored90%from 54 tests.

About plugin

  • Plugin page: browser-shots-car...
  • Plugin version: 0.9.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.8
  • WordPress version: 6.3.1
  • First release: Jul 7, 2019
  • Latest release: Jul 25, 2021
  • Number of updates: 16
  • Update frequency: every 46.8 days
  • Top authors: ronalfy (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /1,447 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.01MB] [CPU: ▼4.05ms] Passed 4 tests

A check of server-side resources used by Browser Shots Carousel
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.68 ▼0.67
Dashboard /wp-admin3.31 ▲0.0144.38 ▼8.16
Posts /wp-admin/edit.php3.36 ▲0.0146.63 ▲0.58
Add New Post /wp-admin/post-new.php5.90 ▲0.0287.18 ▼7.96
Media Library /wp-admin/upload.php3.24 ▲0.0134.18 ▲2.32

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 36 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Browser Shots Carousel
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,835 ▲10013.21 ▼1.372.07 ▲0.0540.06 ▼3.24
Dashboard /wp-admin2,206 ▲184.84 ▼1.01113.01 ▼8.0537.26 ▼7.62
Posts /wp-admin/edit.php2,089 ▼01.98 ▼0.0240.73 ▲0.7835.67 ▲1.26
Add New Post /wp-admin/post-new.php6,193 ▲4,66019.21 ▼4.07934.61 ▲278.0158.67 ▼1.28
Media Library /wp-admin/upload.php1,388 ▲34.19 ▼0.0198.09 ▼5.2841.92 ▼3.12

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments

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 | 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: screenshots, blocks, screenshot, website, carousel

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

The principal PHP file in "Browser Shots Carousel" v. 0.9.0 is loaded by WordPress automatically on each request
55 characters long description:
Show off your website screenshots in a carousel format.

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 plugin2,162 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript81452091,170
CSS83367573
PHP23272286
Sass3111133

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity18.00
▷ Minimum class complexity18.00
▷ Maximum class complexity18.00
Average method complexity6.67
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
8 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
src/themes/dark/arrows.png3.02KB0.38KB▼ 87.27%
src/themes/default/arrows.png0.80KB0.51KB▼ 36.53%
src/themes/bar/bullets.png1.25KB1.08KB▼ 13.74%
src/themes/bar/arrows.png0.80KB0.51KB▼ 36.53%
src/themes/light/bullets.png3.21KB0.54KB▼ 83.24%