84% xt-facebook-events

Code Review | = XT Event Widget for Social Events

WordPress plugin = XT Event Widget for Social Events scored84%from 54 tests.

About plugin

  • Plugin page: xt-facebook-events
  • Plugin version: 1.1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3
  • WordPress version: 6.3.1
  • First release: Feb 23, 2017
  • Latest release: Aug 7, 2023
  • Number of updates: 43
  • Update frequency: every 54.8 days
  • Top authors: xylus (95.35%)Dharm1025 (6.98%)

Code review

54 tests

User reviews

14 reviews

Install metrics

1,000+ active /38,549 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.06MB] [CPU: ▼2.53ms] Passed 4 tests

Analyzing server-side resources used by = XT Event Widget for Social Events
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0741.27 ▼0.90
Dashboard /wp-admin3.35 ▲0.0559.20 ▲4.72
Posts /wp-admin/edit.php3.47 ▲0.1153.42 ▲2.39
Add New Post /wp-admin/post-new.php5.96 ▲0.0792.95 ▼13.78
Media Library /wp-admin/upload.php3.28 ▲0.0541.52 ▲2.16

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 49 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
widget_xtfacebook_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for = XT Event Widget for Social Events
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,854 ▲6813.56 ▼0.841.58 ▼0.4344.02 ▼5.94
Dashboard /wp-admin2,252 ▲495.04 ▼0.80104.36 ▼3.3640.11 ▼1.61
Posts /wp-admin/edit.php2,136 ▲362.33 ▲0.1941.23 ▼0.2536.53 ▼1.20
Add New Post /wp-admin/post-new.php6,395 ▲4,84928.05 ▲4.89918.90 ▲234.8334.60 ▼37.33
Media Library /wp-admin/upload.php1,431 ▲314.47 ▲0.21118.14 ▲7.2444.87 ▼2.49

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_xtfacebook_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for 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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Notice
      Undefined variable: picture_url in wp-content/plugins/xt-facebook-events/templates/event-widget-style1.php on line 10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function date_i18n() in wp-content/plugins/xt-facebook-events/templates/event-widget-style1.php:21

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

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: A description for screenshot #9 is missing in xt-facebook-events/assets to your readme.txt
  • Tags: Too many tags (14 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt is a good inspiration

xt-facebook-events/xt-facebook-events.php Passed 13 tests

The main file in "= XT Event Widget for Social Events" v. 1.1.5 serves as a complement to information provided in readme.txt and as the entry point to the plugin
58 characters long description:
Display Facebook Events into your WordPress site anywhere.

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
Success! There were no dangerous files found in this plugin25,088 lines of code in 37 files:
LanguageFilesBlank linesComment linesLines of code
JSON20016,249
CSS586303,920
SVG6032,888
PHP172555541,801
JavaScript558155
Markdown223075

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity28.12
▷ Minimum class complexity7.00
▷ Maximum class complexity89.00
Average method complexity4.74
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods59
▷ Static methods11.69%
▷ Public methods5491.53%
▷ Protected methods11.69%
▷ Private methods46.78%
Functions6
▷ Named functions583.33%
▷ Anonymous functions116.67%
Constants6
▷ Global constants6100.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
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/xt_logo.png8.77KB4.34KB▼ 50.47%