84% web-screenshots

Code Review | Web Screenshots

WordPress plugin Web Screenshots scored84%from 54 tests.

About plugin

  • Plugin page: web-screenshots
  • Plugin version: 1.2.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.4.2
  • WordPress version: 6.3.1
  • First release: Oct 4, 2012
  • Latest release: Oct 15, 2012
  • Number of updates: 24
  • Update frequency: every 0.5 days
  • Top authors: janrenz (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

20+ active /2,048 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼6.25ms] Passed 4 tests

Analyzing server-side resources used by Web Screenshots
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.37 ▲0.24
Dashboard /wp-admin3.32 ▲0.0148.69 ▲0.88
Posts /wp-admin/edit.php3.37 ▲0.0148.03 ▼2.46
Add New Post /wp-admin/post-new.php5.90 ▲0.0186.42 ▼23.65
Media Library /wp-admin/upload.php3.24 ▲0.0133.73 ▲3.79

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Web Screenshots
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.61 ▼0.741.70 ▼0.0938.31 ▼9.81
Dashboard /wp-admin2,206 ▲214.86 ▼1.03107.09 ▲4.7739.15 ▼6.01
Posts /wp-admin/edit.php2,089 ▼32.00 ▼0.0239.79 ▼2.4234.57 ▼4.05
Add New Post /wp-admin/post-new.php1,533 ▼922.84 ▲4.58642.22 ▲48.4252.54 ▼3.59
Media Library /wp-admin/upload.php1,382 ▼64.20 ▼0.0196.32 ▼8.5140.47 ▼0.91

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
Please fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/web-screenshots/index.php:34

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

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
1 plugin tags: screenshot

web-screenshots/index.php 92% from 13 tests

"Web Screenshots" version 1.2.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("web-screenshots.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected76 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1102751
JavaScript10525

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity4.50
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.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
There were not PNG files found in your plugin