83% import-facebook-events

Code Review | Import Social Events

WordPress plugin Import Social Events scored83%from 54 tests.

About plugin

  • Plugin page: import-facebook-e...
  • Plugin version: 1.7.6
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.4
  • WordPress version: 6.3.1
  • First release: Dec 14, 2016
  • Latest release: Nov 7, 2023
  • Number of updates: 107
  • Update frequency: every 23.5 days
  • Top authors: xylus (97.2%)Dharm1025 (3.74%)

Code review

54 tests

User reviews

104 reviews

Install metrics

5,000+ active /196,219 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲1.32MB] [CPU: ▲3.09ms] Passed 4 tests

Server-side resources used by Import Social Events
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.81 ▲1.3549.42 ▲7.17
Dashboard /wp-admin4.62 ▲1.2851.39 ▼9.82
Posts /wp-admin/edit.php4.68 ▲1.3253.55 ▲8.23
Add New Post /wp-admin/post-new.php7.23 ▲1.3596.59 ▲6.78
Media Library /wp-admin/upload.php4.55 ▲1.3248.23 ▲11.98
Event Tags /wp-admin/edit-tags.php?taxonomy=facebook_tag&post_type=facebook_events4.5450.05
Facebook Events /wp-admin/edit.php?post_type=facebook_events4.6045.67
Event Categories /wp-admin/edit-tags.php?taxonomy=facebook_category&post_type=facebook_events4.5439.48
Add New /wp-admin/post-new.php?post_type=facebook_events4.7062.45

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 167 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Import Social Events
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,918 ▲17113.34 ▼0.981.65 ▼0.0642.84 ▼1.18
Dashboard /wp-admin2,315 ▲1415.00 ▼0.6793.52 ▼2.3941.51 ▼2.80
Posts /wp-admin/edit.php2,222 ▲1222.33 ▲0.2742.21 ▲4.8534.08 ▼0.22
Add New Post /wp-admin/post-new.php1,760 ▲23420.57 ▼2.87844.73 ▲102.0138.20 ▼31.79
Media Library /wp-admin/upload.php1,514 ▲1174.66 ▲0.49104.19 ▲1.1242.85 ▼1.57
Event Tags /wp-admin/edit-tags.php?taxonomy=facebook_tag&post_type=facebook_events1,3682.0234.0729.78
Facebook Events /wp-admin/edit.php?post_type=facebook_events1,2552.4135.8429.94
Event Categories /wp-admin/edit-tags.php?taxonomy=facebook_category&post_type=facebook_events1,3992.0234.2031.35
Add New /wp-admin/post-new.php?post_type=facebook_events3,3897.67195.9177.65

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not 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
Please take a closer look at the following
  • 17× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Kigkonsult\\Icalcreator\\VetComponent' not found in wp-content/plugins/import-facebook-events/includes/lib/icalcreator/src/Vevent.php:44
    • > PHP Fatal error
      Uncaught Error: Interface 'Kigkonsult\\Icalcreator\\IcalInterface' not found in wp-content/plugins/import-facebook-events/includes/lib/icalcreator/src/IcalBase.php:72
    • > PHP Fatal error
      Uncaught Error: Class 'Kigkonsult\\Icalcreator\\CalendarComponent' not found in wp-content/plugins/import-facebook-events/includes/lib/icalcreator/src/Valarm.php:44
    • > PHP Fatal error
      Uncaught Error: Class 'Kigkonsult\\Icalcreator\\VetComponent' not found in wp-content/plugins/import-facebook-events/includes/lib/icalcreator/src/Vtodo.php:44
    • > PHP Fatal error
      Uncaught Error: Class 'Kigkonsult\\Icalcreator\\IcalBase' not found in wp-content/plugins/import-facebook-events/includes/lib/icalcreator/src/Vcalendar.php:77
    • > PHP Fatal error
      Uncaught Error: Class 'Kigkonsult\\Icalcreator\\DScomponent' not found in wp-content/plugins/import-facebook-events/includes/lib/icalcreator/src/Daylight.php:39
    • > PHP Fatal error
      Uncaught Error: Class 'Kigkonsult\\Icalcreator\\CalendarComponent' not found in wp-content/plugins/import-facebook-events/includes/lib/icalcreator/src/Vtimezone.php:45
    • > PHP Fatal error
      Uncaught Error: Class 'Kigkonsult\\Icalcreator\\Vcomponent' not found in wp-content/plugins/import-facebook-events/includes/lib/icalcreator/src/Vfreebusy.php:44
    • > PHP Fatal error
      Uncaught Error: Class 'Kigkonsult\\Icalcreator\\IcalBase' not found in wp-content/plugins/import-facebook-events/includes/lib/icalcreator/src/CalendarComponent.php:69
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/import-facebook-events/templates/ife-archive-content2.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Tags: Too many tags (22 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Screenshots: A description for screenshot #13 is missing in import-facebook-events/assets to your readme.txt
You can look at the official readme.txt

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

The entry point to "Import Social Events" version 1.7.6 is a PHP file that has certain tags in its header comment area
100 characters long description:
Import Social Events allows you to import Facebook ( facebook.com ) events into your WordPress site.

Code Analysis 97% from 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
Everything looks great! No dangerous files found in this plugin33,558 lines of code in 142 files:
LanguageFilesBlank linesComment linesLines of code
PHP1222,05410,60723,554
CSS6135775,077
SVG6032,888
PO File26668381,427
JavaScript4578420
Markdown2570192

PHP code 50% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
These items need your attention
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 135)
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity36.37
▷ Minimum class complexity1.00
▷ Maximum class complexity318.00
Average method complexity6.24
▷ Minimum method complexity1.00
▷ Maximum method complexity135.00
Code structure
Namespaces3
Interfaces1
Traits54
Classes54
▷ Abstract classes59.26%
▷ Concrete classes4990.74%
▷ Final classes918.37%
Methods735
▷ Static methods23531.97%
▷ Public methods60281.90%
▷ Protected methods121.63%
▷ Private methods12116.46%
Functions18
▷ Named functions1688.89%
▷ Anonymous functions211.11%
Constants224
▷ Global constants114.91%
▷ Class constants21395.09%
▷ Public constants213100.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
15 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/css/images/ui-bg_flat_10_000000_40x100.png0.20KB0.08KB▼ 57.56%
assets/css/images/ui-bg_glass_100_fdf5ce_1x400.png0.34KB0.16KB▼ 54.02%
assets/css/images/ui-icons_ffd27a_256x240.png4.44KB4.17KB▼ 6.02%
assets/css/images/ui-bg_highlight-soft_75_ffe45c_1x100.png0.32KB0.18KB▼ 42.38%
assets/css/images/ui-icons_ef8c08_256x240.png4.44KB4.17KB▼ 6.02%