84% screenshot-to-media

Code Review | Screenshot To Media

WordPress plugin Screenshot To Media scored84%from 54 tests.

About plugin

  • Plugin page: screenshot-to-media
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.5
  • WordPress version: 6.3.1
  • First release: Dec 8, 2020
  • Latest release: Dec 24, 2020
  • Number of updates: 9
  • Update frequency: every 1.8 days
  • Top authors: iwowen (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /469 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.00MB] [CPU: ▼11.95ms] Passed 4 tests

An overview of server-side resources used by Screenshot To Media
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.47 ▼5.75
Dashboard /wp-admin3.31 ▼0.0345.98 ▼18.35
Posts /wp-admin/edit.php3.36 ▲0.0149.42 ▼2.16
Add New Post /wp-admin/post-new.php5.89 ▲0.0192.11 ▼21.53
Media Library /wp-admin/upload.php3.23 ▲0.0138.50 ▲4.76

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Screenshot To Media
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲2913.29 ▼1.211.84 ▼0.1042.53 ▲0.24
Dashboard /wp-admin2,221 ▲154.84 ▼1.01112.83 ▼10.9041.91 ▼1.78
Posts /wp-admin/edit.php2,100 ▼32.01 ▲0.0139.85 ▼6.5535.00 ▼2.96
Add New Post /wp-admin/post-new.php1,559 ▲1918.29 ▼0.17596.96 ▼20.5265.57 ▲12.45
Media Library /wp-admin/upload.php1,400 ▼04.15 ▼0.06100.31 ▼6.1842.37 ▼8.18

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
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • 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
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just 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_action() in wp-content/plugins/screenshot-to-media/screenshot_to_media.php:72

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
5 plugin tags: copy, screenshot, images, image, media

screenshot-to-media/screenshot_to_media.php 92% from 13 tests

The entry point to "Screenshot To Media" version 1.0.0 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("screenshot-to-media.php" instead of "screenshot_to_media.php")

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 plugin54 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP171654

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code1.33
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%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected