79% socketlabs

Code Review | SocketLabs

WordPress plugin SocketLabs scored79%from 54 tests.

About plugin

  • Plugin page: socketlabs
  • Plugin version: 1.0.14
  • PHP compatiblity: 3.0.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.3.1
  • WordPress version: 6.3.1
  • First release: Dec 21, 2017
  • Latest release: Sep 15, 2023
  • Number of updates: 42
  • Update frequency: every 49.9 days
  • Top authors: billvolz (76.19%)bernardharrison (14.29%)socketlabs (9.52%)mattreibach (7.14%)

Code review

54 tests

User reviews

4 reviews

Install metrics

1,000+ active /9,333 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.13MB] [CPU: ▼3.37ms] Passed 4 tests

An overview of server-side resources used by SocketLabs
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1340.62 ▲1.12
Dashboard /wp-admin3.43 ▲0.1344.46 ▼4.13
Posts /wp-admin/edit.php3.54 ▲0.1947.97 ▲0.74
Add New Post /wp-admin/post-new.php6.03 ▲0.1484.15 ▼9.89
Media Library /wp-admin/upload.php3.35 ▲0.1235.88 ▼0.18
SocketLabs /wp-admin/admin.php?page=socketlabs3.3330.74

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 25 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
can_compress_scripts
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by SocketLabs
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,916 ▲15913.63 ▼0.757.74 ▲5.6938.06 ▼9.36
Dashboard /wp-admin2,214 ▲234.81 ▼0.12109.22 ▲4.3041.20 ▼7.00
Posts /wp-admin/edit.php2,097 ▲82.02 ▼0.0040.06 ▲0.9735.07 ▲4.51
Add New Post /wp-admin/post-new.php1,530 ▼318.24 ▼4.90624.34 ▼62.8262.88 ▲2.54
Media Library /wp-admin/upload.php1,396 ▲114.19 ▼0.0295.99 ▼9.8641.15 ▼6.00
SocketLabs /wp-admin/admin.php?page=socketlabs8552.0224.0725.67

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% 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 0% 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 perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/socketlabs/public/partials/socketlabs-public-display.php
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'Socketlabs' not found in wp-content/plugins/socketlabs/admin/partials/socketlabs-admin-display.php:32

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)
No browser errors were detected

Optimizations

Plugin configuration Passed 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
7 plugin tags: email, deliverability, mailing, injection, mailer...

socketlabs/socketlabs.php Passed 13 tests

The main PHP file in "SocketLabs" ver. 1.0.14 adds more information about the plugin and also serves as the entry point for this plugin
42 characters long description:
Send emails using your SocketLabs account.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected1,165 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP16190749738
CSS1454380
Markdown118044
JavaScript12273

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity9.10
▷ Minimum class complexity1.00
▷ Maximum class complexity48.00
Average method complexity3.13
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods38
▷ Static methods923.68%
▷ Public methods2976.32%
▷ Protected methods00.00%
▷ Private methods923.68%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants12
▷ Global constants1191.67%
▷ Class constants18.33%
▷ Public constants1100.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
There are no PNG files in this plugin