89% social-pixel

Code Review | Social Pixel

WordPress plugin Social Pixel scored89%from 54 tests.

About plugin

  • Plugin page: social-pixel
  • Plugin version: 2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.1
  • WordPress version: 6.3.1
  • First release: Oct 22, 2018
  • Latest release: Oct 26, 2022
  • Number of updates: 10
  • Update frequency: every 146.5 days
  • Top authors: labschool (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /2,762 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.01MB] [CPU: ▼7.25ms] Passed 4 tests

An overview of server-side resources used by Social Pixel
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0134.60 ▼5.31
Dashboard /wp-admin3.31 ▲0.0148.31 ▼2.66
Posts /wp-admin/edit.php3.36 ▲0.0144.76 ▼6.32
Add New Post /wp-admin/post-new.php5.89 ▲0.0187.36 ▼12.27
Media Library /wp-admin/upload.php3.24 ▲0.0133.94 ▼5.08
Social Pixel /wp-admin/options-general.php?page=social-pixel3.2026.04

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Social Pixel
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.35 ▼1.031.59 ▼0.1237.71 ▼4.61
Dashboard /wp-admin2,210 ▲225.91 ▲0.11113.02 ▲12.4544.65 ▼0.93
Posts /wp-admin/edit.php2,093 ▲41.99 ▼0.0033.80 ▼5.7631.36 ▼2.41
Add New Post /wp-admin/post-new.php1,538 ▲1923.06 ▼0.00637.82 ▼38.9852.02 ▼2.00
Media Library /wp-admin/upload.php1,389 ▲44.20 ▲0.0296.22 ▼13.6842.29 ▼7.63
Social Pixel /wp-admin/options-general.php?page=social-pixel1,2621.7226.1033.69

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
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
No output text or server-side errors detected on direct access of PHP files

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 issues were found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Tags: There are too many tags (28 tag instead of maximum 10)
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === social-pixel === )
The official readme.txt is a good inspiration

social-pixel/sp-conf.php 85% from 13 tests

"Social Pixel" version 2.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Description: The description should be shorter than 140 characters (currently 275 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("social-pixel.php" instead of "sp-conf.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected1,863 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP438471,863

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.46
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%
Functions34
▷ Named functions3191.18%
▷ Anonymous functions38.82%
Constants0
▷ Global constants00.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
There are no PNG files in this plugin