83% ls-oembed-support-for-scratch-mit

Code Review | LS oEmbed support for Scratch Mit

WordPress plugin LS oEmbed support for Scratch Mit scored83%from 54 tests.

About plugin

  • Plugin page: ls-oembed-support...
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: WordPress 4.0-6.1
  • WordPress version: 6.3.1
  • First release: Jan 5, 2016
  • Latest release: Oct 24, 2022
  • Number of updates: 16
  • Update frequency: every 155.3 days
  • Top authors: lenasterg (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /2,746 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.00MB] [CPU: ▼5.92ms] Passed 4 tests

Analyzing server-side resources used by LS oEmbed support for Scratch Mit
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0042.00 ▼0.63
Dashboard /wp-admin3.31 ▲0.0047.33 ▼8.83
Posts /wp-admin/edit.php3.36 ▲0.0047.66 ▼0.99
Add New Post /wp-admin/post-new.php5.89 ▲0.0093.10 ▼13.20
Media Library /wp-admin/upload.php3.23 ▲0.0035.57 ▼0.66

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

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

Browser metrics Passed 4 tests

A check of browser resources used by LS oEmbed support for Scratch Mit
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.30 ▼1.385.58 ▲3.7843.65 ▼4.67
Dashboard /wp-admin2,203 ▲125.83 ▼0.0898.22 ▲0.5637.13 ▼10.87
Posts /wp-admin/edit.php2,086 ▼32.02 ▼0.0334.47 ▼7.0432.85 ▼4.42
Add New Post /wp-admin/post-new.php1,536 ▼622.88 ▲4.67594.38 ▼31.5356.98 ▼2.28
Media Library /wp-admin/upload.php1,382 ▼34.21 ▼0.0196.04 ▼4.2141.77 ▼3.41

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
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ls-oembed-support-for-scratch-mit/scratchmit.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Donate link: Invalid URI found ("")
You can look at the official readme.txt

ls-oembed-support-for-scratch-mit/scratchmit.php 77% from 13 tests

The primary PHP file in "LS oEmbed support for Scratch Mit" version 2.0 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("ls-oembed-support-for-scratch-mit.php" instead of "scratchmit.php")
  • Text Domain: The text domain should only use lowercase characters and dashes
  • Requires at least: Required version number should only contain digits separated by dots (ex. "7.0" instead of "WordPress 4.0")

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
There were no executable files found in this plugin67 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PO File271242
PHP171925

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.10
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin