84% simple-facebook-plugin

Code Review | Simple Like Page Plugin

WordPress plugin Simple Like Page Plugin scored84%from 54 tests.

About plugin

  • Plugin page: simple-facebook-p...
  • Plugin version: 1.5.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3.2
  • WordPress version: 6.3.1
  • First release: Sep 9, 2011
  • Latest release: Nov 3, 2023
  • Number of updates: 51
  • Update frequency: every 87.0 days
  • Top authors: fornyhucker (100%)

Code review

54 tests

User reviews

23 reviews

Install metrics

20,000+ active /299,082 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼9.59ms] Passed 4 tests

An overview of server-side resources used by Simple Like Page Plugin
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0837.83 ▼3.00
Dashboard /wp-admin3.38 ▲0.0446.94 ▼17.42
Posts /wp-admin/edit.php3.50 ▲0.1446.10 ▼2.86
Add New Post /wp-admin/post-new.php5.97 ▲0.0884.95 ▼15.07
Media Library /wp-admin/upload.php3.31 ▲0.0835.76 ▲2.90

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
widget_sfp_page_plugin_widget
db_upgraded
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Simple Like Page Plugin
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,828 ▲5614.21 ▼0.141.98 ▼0.0638.53 ▼5.60
Dashboard /wp-admin2,211 ▲315.63 ▼0.0189.18 ▼13.4043.46 ▲0.69
Posts /wp-admin/edit.php2,113 ▲131.94 ▼0.1940.23 ▲6.3439.07 ▲1.97
Add New Post /wp-admin/post-new.php1,539 ▲1323.43 ▲0.67640.79 ▼8.6358.34 ▲2.01
Media Library /wp-admin/upload.php1,410 ▲104.16 ▼0.11103.50 ▲0.0742.49 ▲1.20

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_sfp_page_plugin_widget
    • theysaidso_admin_options

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
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 10× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/simple-facebook-plugin/simple-facebook-plugin.php:43
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/simple-facebook-plugin/views/view-page-plugin.php:11
    • > PHP Notice
      Undefined variable: small_header in wp-content/plugins/simple-facebook-plugin/views/view-page-plugin.php on line 5
    • > PHP Notice
      Undefined variable: events in wp-content/plugins/simple-facebook-plugin/views/view-page-plugin.php on line 7
    • > PHP Notice
      Undefined variable: messages in wp-content/plugins/simple-facebook-plugin/views/view-page-plugin.php on line 8
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/simple-facebook-plugin/lib/sfp-page-plugin.php:19
    • > PHP Notice
      Undefined variable: hide_cover in wp-content/plugins/simple-facebook-plugin/views/view-page-plugin.php on line 3
    • > PHP Notice
      Undefined variable: timeline in wp-content/plugins/simple-facebook-plugin/views/view-page-plugin.php on line 6
    • > PHP Notice
      Undefined variable: show_facepile in wp-content/plugins/simple-facebook-plugin/views/view-page-plugin.php on line 4
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/simple-facebook-plugin/views/view-menu.php:6

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (Widget in the dashboard.), #2 (Simple Widget on your website.), #3 (Widget with posts on your website.)
  • Tags: There are too many tags (13 tag instead of maximum 10)
Please take inspiration from this readme.txt

simple-facebook-plugin/simple-facebook-plugin.php Passed 13 tests

The principal PHP file in "Simple Like Page Plugin" v. 1.5.2 is loaded by WordPress automatically on each request
72 characters long description:
Allows you to integrate Facebook "Page Plugin" into your WordPress Site.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected482 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP4137166431
CSS10051

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity1.90
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods20
▷ Static methods15.00%
▷ Public methods1890.00%
▷ Protected methods210.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
4 PNG files occupy 0.38MB with 0.17MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png111.26KB40.59KB▼ 63.51%
screenshot-3.png170.36KB59.11KB▼ 65.30%
screenshot-1.png103.43KB44.98KB▼ 56.51%
lib/img/help_icon.png0.75KB0.79KB0.00%