79% swiftninjapro-facebook-embed

Code Review | Simple Page Embed

WordPress plugin Simple Page Embed scored79%from 54 tests.

About plugin

  • Plugin page: swiftninjapro-fac...
  • Plugin version: 1.1.11
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.5
  • WordPress version: 6.3.1
  • First release: May 17, 2019
  • Latest release: Oct 22, 2020
  • Number of updates: 30
  • Update frequency: every 17.5 days
  • Top authors: swiftninjapro (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /867 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
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼7.87ms] Passed 4 tests

An overview of server-side resources used by Simple Page Embed
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0246.08 ▲5.37
Dashboard /wp-admin3.32 ▲0.0250.59 ▼5.91
Posts /wp-admin/edit.php3.37 ▲0.0250.65 ▲0.26
Add New Post /wp-admin/post-new.php5.90 ▲0.0288.13 ▼29.38
Media Library /wp-admin/upload.php3.24 ▲0.0139.00 ▲3.56
SwiftNinjaPro Settings /wp-admin/admin.php?page=swiftninjapro-settings3.2337.51
Facebook Embed /wp-admin/admin.php?page=swiftninjapro-facebook-embed3.2935.32

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

Simple Page Embed: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲5814.76 ▲0.392.27 ▲0.4342.51 ▼1.59
Dashboard /wp-admin2,209 ▲325.57 ▼0.0384.33 ▼1.5371.16 ▲29.96
Posts /wp-admin/edit.php2,126 ▲261.99 ▼0.0434.77 ▼4.8337.68 ▲4.61
Add New Post /wp-admin/post-new.php1,563 ▲3723.05 ▼0.48770.01 ▲97.0667.05 ▲7.20
Media Library /wp-admin/upload.php1,429 ▲324.12 ▼0.0993.95 ▼10.4968.86 ▲24.12
SwiftNinjaPro Settings /wp-admin/admin.php?page=swiftninjapro-settings7972.0024.8527.31
Facebook Embed /wp-admin/admin.php?page=swiftninjapro-facebook-embed8952.1222.9429.98

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
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These server-side errors were triggered
    • > GET request to /wp-admin/admin.php?page=swiftninjapro-facebook-embed
    • > Warning in wp-content/plugins/swiftninjapro-facebook-embed/templates/admin.php+94
    Cannot modify header information - headers already sent by (output started at wp-includes/script-loader.php:2838)

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
Please fix the following items
  • 4× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/swiftninjapro-facebook-embed/templates/settings-info.php
    • > /wp-content/plugins/swiftninjapro-facebook-embed/templates/admin.php
    • > /wp-content/plugins/swiftninjapro-facebook-embed/swiftninjapro-facebook-embed.php
    • > /wp-content/plugins/swiftninjapro-facebook-embed/main.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
6 plugin tags: embed, social, page, responsive, fb...

swiftninjapro-facebook-embed/swiftninjapro-facebook-embed.php Passed 13 tests

"Simple Page Embed" version 1.1.11's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
49 characters long description:
Embed a responsive Facebook page to your website.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected429 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP59233384
JavaScript15030
CSS11015

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity18.00
▷ Minimum class complexity16.00
▷ Maximum class complexity20.00
Average method complexity2.62
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods21
▷ Static methods00.00%
▷ Public methods21100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions9100.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
2 PNG files occupy 0.47MB with 0.27MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
templates/example-image1.png476.84KB131.36KB▼ 72.45%
assets/settings_icon.png3.27KB1.85KB▼ 43.48%