84% tp-social-media-bar

Code Review | TP Social Media Bar

WordPress plugin TP Social Media Bar scored84%from 54 tests.

About plugin

  • Plugin page: tp-social-media-bar
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7.0-5.9.2
  • WordPress version: 6.3.1
  • First release: Mar 21, 2022
  • Latest release: Mar 22, 2022
  • Number of updates: 8
  • Update frequency: every 0.5 days
  • Top authors: arrony200 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /569 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
Install script ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼4.82ms] Passed 4 tests

A check of server-side resources used by TP Social Media Bar
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0351.77 ▲8.08
Dashboard /wp-admin3.38 ▲0.0453.44 ▼11.79
Posts /wp-admin/edit.php3.50 ▲0.1450.06 ▼1.00
Add New Post /wp-admin/post-new.php5.96 ▲0.0795.01 ▼5.44
Media Library /wp-admin/upload.php3.28 ▲0.0535.69 ▼1.04

Server storage [IO: ▲1.08MB] [DB: ▲0.07MB] Passed 3 tests

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 19 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for TP Social Media Bar
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,084 ▲33815.42 ▲1.046.31 ▲4.3639.76 ▼6.73
Dashboard /wp-admin2,380 ▲1926.64 ▲0.74135.55 ▲14.3340.00 ▼2.90
Posts /wp-admin/edit.php2,286 ▲1943.64 ▲1.6547.48 ▲11.9431.05 ▼0.25
Add New Post /wp-admin/post-new.php1,543 ▲917.90 ▼5.63656.14 ▼17.0339.48 ▼22.94
Media Library /wp-admin/upload.php1,428 ▲404.25 ▼0.0087.90 ▼15.4741.94 ▼4.76

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 2× 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/tp-social-media-bar/include/functions.php:124
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tp-social-media-bar/include/settings.php:5

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 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes: Please take inspiration from this readme.txt

tp-social-media-bar/tp-social-media-bar.php Passed 13 tests

The primary PHP file in "TP Social Media Bar" version 1.0.0 is used by WordPress to initiate all plugin functionality
93 characters long description:
This is a Social Media Bar plugin to social media icons on the site right side for all pages.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin7,761 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
CSS32,218134,919
PHP443102,795
JavaScript219347

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity30.00
▷ Minimum class complexity30.00
▷ Maximum class complexity30.00
Average method complexity1.76
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods38
▷ Static methods00.00%
▷ Public methods38100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected