83% responsive-facebook-like-box

Code Review | Responsive Like Box, Like Box Widget

WordPress plugin Responsive Like Box, Like Box Widget scored83%from 54 tests.

About plugin

  • Plugin page: responsive-facebo...
  • Plugin version: 3.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.2
  • WordPress version: 6.3.1
  • First release: Oct 9, 2013
  • Latest release: Jun 1, 2023
  • Number of updates: 52
  • Update frequency: every 67.8 days
  • Top authors: freewebmentor (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

1,000+ active /50,376 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▼0.00MB] [CPU: ▼8.99ms] Passed 4 tests

A check of server-side resources used by Responsive Like Box, Like Box Widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0145.52 ▲3.82
Dashboard /wp-admin3.31 ▼0.0350.82 ▼12.68
Posts /wp-admin/edit.php3.37 ▲0.0146.51 ▼7.22
Add New Post /wp-admin/post-new.php5.90 ▲0.0188.08 ▼15.36
Media Library /wp-admin/upload.php3.24 ▲0.0136.32 ▼0.70

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_recent-posts
widget_themater_facebook
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Responsive Like Box, Like Box Widget
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.12 ▼0.471.76 ▼0.4247.71 ▲6.45
Dashboard /wp-admin2,198 ▲185.57 ▼0.1288.55 ▼1.7238.22 ▼7.86
Posts /wp-admin/edit.php2,100 ▼02.03 ▲0.0236.51 ▼0.4836.66 ▼4.14
Add New Post /wp-admin/post-new.php1,554 ▲2318.30 ▼4.91633.90 ▼91.7948.65 ▼12.22
Media Library /wp-admin/upload.php1,394 ▼64.21 ▼0.0097.97 ▼14.8942.12 ▼7.24

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
The following items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_themater_facebook
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget

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
Everything seems fine, however 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
Almost there! Just fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/responsive-facebook-like-box/facebook.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/responsive-facebook-like-box/inc/shortcode.php:8

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention: The official readme.txt is a good inspiration

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

The main PHP file in "Responsive Like Box, Like Box Widget" ver. 3.0.1 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("responsive-facebook-like-box.php" instead of "facebook.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin134 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP21516134

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.10
Average class complexity4.00
▷ Minimum class complexity3.00
▷ Maximum class complexity5.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants0
▷ Global constants00.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.08MB with 0.05MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png82.39KB28.17KB▼ 65.82%