72% wp-site-screenshot

Code Review | WP Site Screenshot

WordPress plugin WP Site Screenshot scored 72% from 54 tests.

About plugin

  • Plugin page: wp-site-screenshot
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-5.2
  • WordPress version: 6.3.1
  • First release: Nov 2, 2019
  • Latest release: Nov 2, 2019
  • Number of updates: 6
  • Update frequency: every 0.5 days
  • Top authors: anusha95 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 688 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.14MB] [CPU: ▲0.05ms] Passed 4 tests

Analyzing server-side resources used by WP Site Screenshot
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1543.22 ▼1.35
Dashboard /wp-admin3.45 ▲0.1453.72 ▲0.49
Posts /wp-admin/edit.php3.50 ▲0.1455.07 ▲2.53
Add New Post /wp-admin/post-new.php6.05 ▲0.16109.83 ▲16.16
Media Library /wp-admin/upload.php3.37 ▲0.1437.34 ▼1.47
All Site /wp-admin/edit.php?post_type=wp_site_captcha3.4239.95
Settings /wp-admin/edit.php?post_type=wp_site_captcha&page=wpsst_custompost_settings3.3236.01
Categories /wp-admin/edit-tags.php?taxonomy=wp_site_captcha-categories&post_type=wp_site_captcha3.3736.08
Add New /wp-admin/post-new.php?post_type=wp_site_captcha3.4656.67

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

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

Browser metrics Passed 4 tests

A check of browser resources used by WP Site Screenshot
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,940 ▲15113.75 ▼1.018.69 ▲6.8343.35 ▼2.23
Dashboard /wp-admin2,247 ▲415.87 ▲1.00114.72 ▲2.3641.13 ▼1.03
Posts /wp-admin/edit.php2,136 ▲502.06 ▲0.0641.40 ▲4.8834.02 ▲0.33
Add New Post /wp-admin/post-new.php1,552 ▲1923.09 ▲0.12677.25 ▼16.1462.81 ▲2.28
Media Library /wp-admin/upload.php1,426 ▲414.28 ▲0.0498.95 ▼5.3542.20 ▼3.36
All Site /wp-admin/edit.php?post_type=wp_site_captcha1,1221.9932.0531.67
Settings /wp-admin/edit.php?post_type=wp_site_captcha&page=wpsst_custompost_settings8461.7125.9333.08
Categories /wp-admin/edit-tags.php?taxonomy=wp_site_captcha-categories&post_type=wp_site_captcha1,3092.1928.5528.21
Add New /wp-admin/post-new.php?post_type=wp_site_captcha1,8253.6164.4135.38

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=wp_site_captcha&page=wpsst_custompost_settings
    • > Notice in wp-content/plugins/wp-site-screenshot/custompost/class-wp-site-screenshot-custompost.php+554
    Trying to access array offset on value of type bool

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 fix the following
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/wp-site-screenshot/class-wp-site-details-display.php:292
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-site-screenshot/custompost/class-wp-site-screenshot-custompost.php:615
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-site-screenshot/custompost/class-wp-site-screenshot-custompost.php:615

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There are user-side issues you should fix
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=wp_site_captcha-categories&post_type=wp_site_captcha
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: jQuery(...).live is not a function" "TypeError: jQuery(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/wp-site-screenshot//assets/js/admin/wpsst-js-backend-script.js?ver=1.0.0:14:30)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=wp_site_captcha-categories&post_type=wp_site_captcha
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught TypeError: jQuery(...).live is not a function
    • > GET request to /wp-admin/post-new.php?post_type=wp_site_captcha
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1 1:28609 "jQuery.Deferred exception: jQuery(...).live is not a function" "TypeError: jQuery(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/wp-site-screenshot//assets/js/admin/wpsst-js-backend-script.js?ver=1.0.0:14:30)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/post-new.php?post_type=wp_site_captcha
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1 1:28721 Uncaught TypeError: jQuery(...).live is not a function

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Screenshots: Please add descriptions for these screenshots #0, #0, #1, #2, #3, #4, #5, #6, #7 in wp-site-screenshot/assets to your readme.txt
You can look at the official readme.txt

wp-site-screenshot/class-wp-site-screenshot.php 92% from 13 tests

"WP Site Screenshot" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wp-site-screenshot.php" instead of "class-wp-site-screenshot.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected2,311 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
CSS454631,434
PHP351118813
JavaScript261661
JSON2002
SVG1001

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity29.33
▷ Minimum class complexity1.00
▷ Maximum class complexity59.00
Average method complexity7.07
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods14
▷ Static methods14100.00%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
No PNG images were found in this plugin