84% cb-facebook-like-box

Code Review | CB Social Like Box

WordPress plugin CB Social Like Box scored84%from 54 tests.

About plugin

  • Plugin page: cb-facebook-like-box
  • Plugin version: 1.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.2.3
  • WordPress version: 6.3.1
  • First release: Jul 30, 2015
  • Latest release: Sep 24, 2019
  • Number of updates: 24
  • Update frequency: every 63.3 days
  • Top authors: hmbashar (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,638 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼8.33ms] Passed 4 tests

This is a short check of server-side resources used by CB Social Like Box
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0235.25 ▼7.81
Dashboard /wp-admin3.33 ▼0.0245.93 ▼14.37
Posts /wp-admin/edit.php3.38 ▲0.0244.68 ▲0.88
Add New Post /wp-admin/post-new.php5.91 ▲0.0288.22 ▼5.79
Media Library /wp-admin/upload.php3.25 ▲0.0233.25 ▼5.34

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 7 new options
New WordPress options
widget_custom_widget_class
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for CB Social Like Box
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.62 ▼0.944.44 ▲2.6738.27 ▼3.33
Dashboard /wp-admin2,206 ▲184.87 ▼0.04106.55 ▼0.4741.07 ▼3.04
Posts /wp-admin/edit.php2,092 ▲32.01 ▲0.0040.14 ▲2.8234.74 ▲2.59
Add New Post /wp-admin/post-new.php1,534 ▲2023.30 ▲5.77593.52 ▼85.5449.86 ▼4.39
Media Library /wp-admin/upload.php1,388 ▼04.18 ▼0.0298.02 ▼10.7741.33 ▼5.37

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
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_custom_widget_class
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget

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
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/cb-facebook-like-box/index.php:15

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)
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
4 plugin tags: facebook like plugin, facebook like box, fb like box, facebook like option

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

The main PHP script in "CB Social Like Box" version 1.1.2 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("cb-facebook-like-box.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected81 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1461781

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity5.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%
Functions1
▷ Named functions1100.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
There were not PNG files found in your plugin