80% privacy-embed

Code Review | Privacy Embed

WordPress plugin Privacy Embed scored80%from 54 tests.

About plugin

  • Plugin page: privacy-embed
  • Plugin version: 1.0.3
  • PHP compatiblity: 5.1.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-5.7
  • WordPress version: 6.3.1
  • First release: Jun 9, 2021
  • Latest release: Jun 22, 2021
  • Number of updates: 12
  • Update frequency: every 7.7 days
  • Top authors: juliangroshaupt (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /446 total downloads

Benchmarks

Plugin footprint 65% 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: ▼1.68MB] [CPU: ▼52.19ms] Passed 4 tests

A check of server-side resources used by Privacy Embed
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.32 ▼1.155.86 ▼38.43
Dashboard /wp-admin2.34 ▼1.019.09 ▼47.74
Posts /wp-admin/edit.php2.34 ▼1.027.54 ▼39.95
Add New Post /wp-admin/post-new.php2.34 ▼3.556.77 ▼82.62
Media Library /wp-admin/upload.php2.34 ▼0.897.83 ▼27.19

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 23 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Privacy Embed
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,921 ▲16013.46 ▼0.529.82 ▲7.3744.70 ▼1.94
Dashboard /wp-admin2,209 ▲295.57 ▼0.0886.47 ▼3.2438.51 ▲2.14
Posts /wp-admin/edit.php2,117 ▲172.12 ▲0.1135.36 ▼2.2732.38 ▼3.92
Add New Post /wp-admin/post-new.php1,552 ▲3517.88 ▼1.10646.77 ▲206.7478.19 ▲9.17
Media Library /wp-admin/upload.php1,420 ▲234.22 ▲0.0198.98 ▼4.6241.71 ▼3.33

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the jquery handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% 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
These attributes need your attention:
  • License uri: Invalid URI ("License URI: https://www.gnu.org/licenses/gpl-2.0.html")
Please take inspiration from this readme.txt

privacy-embed/privacy-embed.php Passed 13 tests

The main file in "Privacy Embed" v. 1.0.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
87 characters long description:
Providing shortcodes to privacy-friendly embed external elements (like YouTube videos).

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
There were no executable files found in this plugin1,505 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP131823201,134
PO File14747165
CSS1233144
Markdown114036
JavaScript12326

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.55
Average class complexity26.00
▷ Minimum class complexity1.00
▷ Maximum class complexity155.00
Average method complexity7.03
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods29
▷ Static methods00.00%
▷ Public methods1965.52%
▷ Protected methods1034.48%
▷ Private methods00.00%
Functions5
▷ Named functions5100.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
1 PNG file occupies 0.33MB with 0.21MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
public/images/spotify_thumbnail.png341.27KB124.78KB▼ 63.44%