84% wp-featured-screenshot

Code Review | WP Featured Screenshot

WordPress plugin WP Featured Screenshot scored 84% from 54 tests.

About plugin

  • Plugin page: wp-featured-scree...
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Sep 9, 2015
  • Latest release: Sep 18, 2018
  • Number of updates: 7
  • Update frequency: every 157.9 days
  • Top authors: Rico Macchi (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

100+ active / 3,523 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
Install script ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼3.30ms] Passed 4 tests

A check of server-side resources used by WP Featured Screenshot
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0638.52 ▼6.41
Dashboard /wp-admin3.35 ▲0.0446.05 ▼4.99
Posts /wp-admin/edit.php3.40 ▲0.0447.95 ▲0.51
Add New Post /wp-admin/post-new.php5.93 ▲0.0495.52 ▼2.29
Media Library /wp-admin/upload.php3.27 ▲0.0437.68 ▲3.23

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

WP Featured Screenshot: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.60 ▼0.961.63 ▼0.7138.02 ▼11.16
Dashboard /wp-admin2,206 ▲184.85 ▼1.09127.02 ▲19.5240.36 ▲1.10
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0539.65 ▲5.5835.74 ▼1.47
Add New Post /wp-admin/post-new.php1,533 ▲1323.55 ▲0.32645.94 ▼29.7950.67 ▼9.40
Media Library /wp-admin/upload.php1,388 ▼04.24 ▼0.00106.17 ▼2.4048.66 ▲1.53

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
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
The following issues need your attention
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/image.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-featured-screenshot/wp-featured-screenshot.php on line 15
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/image.php): failed to open stream: No such file or directory in wp-content/plugins/wp-featured-screenshot/wp-featured-screenshot.php on line 15
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-featured-screenshot/wp-featured-screenshot.php on line 15

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, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Requires at least: Version not formatted correctly
  • Screenshots: Screenshot #3 (The screenshots in the media library.) image required
You can look at the official readme.txt

wp-featured-screenshot/wp-featured-screenshot.php Passed 13 tests

The principal PHP file in "WP Featured Screenshot" v. 1.3 is loaded by WordPress automatically on each request
87 characters long description:
This plugin provides a screenshot of any website as a featured image or embedded image.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin321 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP15725240
JavaScript19060
CSS17121

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.22
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%
Constants2
▷ Global constants2100.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 files were detected