84% embed-page-facebook

Code Review | Easy Embed Page Widget

WordPress plugin Easy Embed Page Widget scored84%from 54 tests.

About plugin

  • Plugin page: embed-page-facebook
  • Plugin version: 1.0.4
  • PHP compatiblity: 5.6.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.7
  • WordPress version: 6.3.1
  • First release: Jan 15, 2019
  • Latest release: Mar 20, 2021
  • Number of updates: 18
  • Update frequency: every 44.2 days
  • Top authors: apsaraaruna (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /876 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

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

Analyzing server-side resources used by Easy Embed Page Widget
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.32 ▼5.77
Dashboard /wp-admin3.33 ▲0.0253.54 ▼0.92
Posts /wp-admin/edit.php3.38 ▲0.0250.33 ▲1.67
Add New Post /wp-admin/post-new.php5.91 ▲0.0290.46 ▼6.14
Media Library /wp-admin/upload.php3.25 ▲0.0235.97 ▲0.68

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 11 new files
Database: no new tables, 8 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
db_upgraded
fbplplugin_settings
can_compress_scripts
widget_foo_widget

Browser metrics Passed 4 tests

A check of browser resources used by Easy Embed Page Widget
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,854 ▲10814.00 ▼0.4037.56 ▲35.8143.33 ▼2.67
Dashboard /wp-admin2,224 ▲365.88 ▲1.01105.49 ▼12.2038.85 ▼4.80
Posts /wp-admin/edit.php2,107 ▲212.02 ▲0.0040.58 ▲4.8134.05 ▼0.72
Add New Post /wp-admin/post-new.php1,529 ▲1017.66 ▼5.50640.69 ▼28.0752.11 ▲2.55
Media Library /wp-admin/upload.php1,409 ▲214.17 ▼0.1198.81 ▼14.7141.74 ▼5.26

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • The uninstall procedure has failed, leaving 8 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • fbplplugin_settings
    • widget_foo_widget

Smoke tests 75% from 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 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
Please fix the following
  • 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/embed-page-facebook/includes/fbplplugin-class.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/embed-page-facebook/includes/fbplplugin-settings-fields.php:93
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/embed-page-facebook/templates/admin/settings-page.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/embed-page-facebook/includes/fbplplugin-menus.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/embed-page-facebook/includes/fbplplugin-styles.php:14

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 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes: You can look at the official readme.txt

embed-page-facebook/embed-page-facebook.php 92% from 13 tests

"Easy Embed Page Widget" version 1.0.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected303 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP67991296
JavaScript1007
CSS20100

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity2.75
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin