84% facebook-fan-page-widget

Code Review | Fan Page Widget by ThemeNcode

WordPress plugin Fan Page Widget by ThemeNcode scored84%from 54 tests.

About plugin

  • Plugin page: facebook-fan-page...
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.2.2
  • WordPress version: 6.3.1
  • First release: May 27, 2015
  • Latest release: Jun 6, 2023
  • Number of updates: 30
  • Update frequency: every 97.7 days
  • Top authors: mamb2b (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

2,000+ active /31,082 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

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

Analyzing server-side resources used by Fan Page Widget by ThemeNcode
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0738.42 ▲0.06
Dashboard /wp-admin3.37 ▲0.0753.32 ▲1.11
Posts /wp-admin/edit.php3.42 ▲0.0747.22 ▲0.62
Add New Post /wp-admin/post-new.php5.96 ▲0.0788.95 ▼12.71
Media Library /wp-admin/upload.php3.30 ▲0.0735.53 ▲0.49

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
widget_ffpw_social
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Fan Page Widget by ThemeNcode
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,809 ▲3813.95 ▼0.4337.56 ▲35.6343.49 ▼1.03
Dashboard /wp-admin2,209 ▲185.91 ▲0.0199.64 ▼6.0536.93 ▼6.60
Posts /wp-admin/edit.php2,092 ▲32.02 ▲0.0338.52 ▼2.9031.11 ▼4.20
Add New Post /wp-admin/post-new.php1,533 ▲1423.29 ▲0.01641.40 ▼25.1453.12 ▼4.99
Media Library /wp-admin/upload.php1,385 ▼64.19 ▼0.0796.56 ▼6.8444.78 ▲1.94

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_ffpw_social
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/facebook-fan-page-widget/facebook-fan-page-widget.php:35

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

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
9 plugin tags: facebook like box widget, facebook like box, facebook page plugin, add facebook likebox to wordpress, facebook...

facebook-fan-page-widget/facebook-fan-page-widget.php Passed 13 tests

The main PHP script in "Fan Page Widget by ThemeNcode" version 2.0 is automatically included on every request by WordPress
88 characters long description:
An widget that will display Facebook Fan page like box. Uses new API of Facebook (v 2.3)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin195 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP110645195

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity48.00
▷ Minimum class complexity48.00
▷ Maximum class complexity48.00
Average method complexity12.75
▷ Minimum method complexity1.00
▷ Maximum method complexity25.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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected