83% web-screenshort

Code Review | Web Screenshort

WordPress plugin Web Screenshort scored83%from 54 tests.

About plugin

  • Plugin page: web-screenshort
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-3.9
  • WordPress version: 6.3.1
  • First release: Jul 26, 2014
  • Latest release: Aug 7, 2014
  • Number of updates: 13
  • Update frequency: every 1.2 days
  • Top authors: aijazsiddique (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /1,730 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▼0.24MB] [CPU: ▼15.33ms] Passed 4 tests

An overview of server-side resources used by Web Screenshort
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.95 ▲0.43
Dashboard /wp-admin3.06 ▼0.2427.65 ▼21.15
Posts /wp-admin/edit.php3.20 ▼0.1633.07 ▼9.94
Add New Post /wp-admin/post-new.php5.44 ▼0.4568.43 ▼20.18
Media Library /wp-admin/upload.php3.13 ▼0.1025.38 ▼10.04

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Web Screenshort
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲7914.47 ▲0.051.78 ▼0.0343.34 ▼3.42
Dashboard /wp-admin2,217 ▲264.86 ▼1.00100.29 ▼2.7237.97 ▼7.41
Posts /wp-admin/edit.php2,106 ▲142.04 ▲0.0342.52 ▲5.8235.95 ▼1.04
Add New Post /wp-admin/post-new.php1,549 ▲1318.44 ▼4.77601.35 ▼62.9853.40 ▼2.29
Media Library /wp-admin/upload.php1,402 ▲144.20 ▼0.0898.09 ▼1.0142.31 ▼1.52

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
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/web-screenshort/wp-screenshort.php:31
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/web-screenshort/wp-screen-admin.php:48

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 90% 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 require attention:
  • Tags: There are too many tags (11 tag instead of maximum 10)
  • Donate link: Please fix this invalid url: ""
The official readme.txt is a good inspiration

web-screenshort/wp-screenshort.php 92% from 13 tests

Analyzing the main PHP file in "Web Screenshort" version 1.0
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("web-screenshort.php" instead of "wp-screenshort.php")

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
Success! There were no dangerous files found in this plugin309 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP22826246
JavaScript110341
CSS27322

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 problems
Cyclomatic complexity
Average complexity per logical line of code0.08
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%
Functions7
▷ Named functions7100.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
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/web-screenshort.png0.76KB0.64KB▼ 16.62%
img/logo.png5.93KB4.69KB▼ 20.88%