84% website-screenshots

Code Review | Website Screenshots

WordPress plugin Website Screenshots scored84%from 54 tests.

About plugin

  • Plugin page: website-screenshots
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.5
  • WordPress version: 6.3.1
  • First release: Aug 20, 2020
  • Latest release: Aug 20, 2020
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: dirk94 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /487 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

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

Analyzing server-side resources used by Website Screenshots
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.40 ▲1.08
Dashboard /wp-admin3.33 ▼0.0146.11 ▼14.17
Posts /wp-admin/edit.php3.38 ▲0.0343.72 ▼3.11
Add New Post /wp-admin/post-new.php5.91 ▲0.0390.12 ▼11.85
Media Library /wp-admin/upload.php3.26 ▲0.0333.30 ▲3.19
Website screenshot options /wp-admin/plugins.php?page=website-screenshot-options3.2229.88

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Website Screenshots
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5814.48 ▲0.131.73 ▼0.0942.53 ▲3.61
Dashboard /wp-admin2,207 ▲225.83 ▲0.0197.04 ▼9.5040.39 ▼2.57
Posts /wp-admin/edit.php2,090 ▼21.99 ▼0.0739.02 ▼3.1735.04 ▼1.43
Add New Post /wp-admin/post-new.php1,536 ▲823.38 ▲0.53626.62 ▼18.4955.51 ▲2.83
Media Library /wp-admin/upload.php1,392 ▲44.21 ▲0.0396.06 ▼5.3641.72 ▼2.24
Website screenshot options /wp-admin/plugins.php?page=website-screenshot-options7822.0522.7728.32

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

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 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
The following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/website-screenshots/website-screenshots.php:103

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Tags: Too many tags (14 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Screenshots: Please add descriptions for these screenshots #1, #2 in website-screenshots/assets to your readme.txt
Please take inspiration from this readme.txt

website-screenshots/website-screenshots.php Passed 13 tests

"Website Screenshots" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
66 characters long description:
A plugin to take website screenshots, powered by screenshotapi.net

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin135 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13625135

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity4.00
▷ Minimum class complexity3.00
▷ Maximum class complexity5.00
Average method complexity1.67
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods9
▷ Static methods222.22%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin