84% cardoza-facebook-like-box

Code Review | Easy Social Like Box - Popup - Sidebar Widget

WordPress plugin Easy Social Like Box - Popup - Sidebar Widget scored 84% from 54 tests.

About plugin

  • Plugin page: cardoza-facebook-...
  • Plugin version: 3.2
  • PHP version: 7.4.16
  • WordPress version: 5.8.1
  • First release: Nov 29, 2011
  • Latest release: Sep 29, 2020
  • Number of updates: 129
  • Update frequency: every 25.0 days
  • Top authors: vinoj.cardoza (80.62%)johnnash1975 (20.16%)

Code review

54 tests

User reviews

19 reviews

Install metrics

10,000+ active / 432,103 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.19MB] [CPU: ▼133.32ms] Passed 4 tests

Analyzing server-side resources used by Easy Social Like Box - Popup - Sidebar Widget
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.03 ▲0.3139.76 ▲18.37
Dashboard /wp-admin3.25 ▲0.1950.41 ▲6.44
Posts /wp-admin/edit.php3.30 ▲0.1944.10 ▲8.58
Add New Post /wp-admin/post-new.php5.62 ▲0.1890.37 ▼549.87
Media Library /wp-admin/upload.php3.19 ▲0.1932.63 ▲1.58
FB Like Box /wp-admin/options-general.php?page=slug_for_fb_like_box3.1736.61

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 26 new files
Database: no new tables, 15 new options
New WordPress options
cfblb_popup_header
cfblb_popup_width
cfblb_popup_small_header
cfblb_small_header
cfblb_popup_show_faces
cfblb_popup_fb_url
cfblb_header
cfblb_popup_height
cfblb_popup_enable_disable
cfblb_show_faces
...

Browser metrics Passed 4 tests

Checking browser requirements for Easy Social Like Box - Popup - Sidebar Widget
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,805 ▲20916.29 ▲0.6615.30 ▲5.5143.95 ▼4.45
Dashboard /wp-admin2,981 ▲475.96 ▼0.27135.43 ▼29.19112.60 ▲0.02
Posts /wp-admin/edit.php2,747 ▲82.86 ▲0.1461.82 ▼0.4790.17 ▼0.81
Add New Post /wp-admin/post-new.php1,624 ▲12421.92 ▲3.24277.69 ▼100.24113.52 ▼0.56
Media Library /wp-admin/upload.php1,818 ▲115.09 ▲0.05141.21 ▼4.07120.39 ▲4.94
FB Like Box /wp-admin/options-general.php?page=slug_for_fb_like_box3,3383.6787.4095.62

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 15 options
    • cfblb_popup_width
    • cfblb_popup_header
    • cfblb_popup_small_header
    • cfblb_popup_repeat_times
    • cfblb_popup_height
    • cfpl_enable
    • cfblb_small_header
    • cfblb_popup_stream
    • cfblb_show_faces
    • cfblb_popup_fb_url
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

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 take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cardoza-facebook-like-box/cardoza_facebook_like_box.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Screenshots: These screenshots require images: #1 (screenshot-1.png), #2 (screenshot-2.gif), #3 (screenshot-3.png), #4 (screenshot-3.gif)
The official readme.txt might help

cardoza-facebook-like-box/cardoza_facebook_like_box.php 92% from 13 tests

This is the main PHP file of "Easy Social Like Box - Popup - Sidebar Widget" version 3.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("cardoza-facebook-like-box.php" instead of "cardoza_facebook_like_box.php")

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
There were no executable files found in this plugin1,803 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP117511896
PO File7278371657
JavaScript2240126
CSS3112124

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
3 PNG files occupy 0.19MB with 0.15MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png69.04KB20.70KB▼ 70.02%
screenshot-3.png70.75KB18.50KB▼ 73.85%
images/fb.png51.97KB1.22KB▼ 97.65%