78% pagepost-specific-social-share-buttons

Code Review | Page/Post Specific Social Share Buttons

WordPress plugin Page/Post Specific Social Share Buttons scored78%from 54 tests.

About plugin

  • Plugin page: pagepost-specific...
  • Plugin version: 2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.5.1
  • WordPress version: 6.3.1
  • First release: Apr 16, 2013
  • Latest release: May 20, 2013
  • Number of updates: 13
  • Update frequency: every 2.6 days
  • Top authors: CompleteWebResources (100%)

Code review

54 tests

User reviews

16 reviews

Install metrics

400+ active /28,476 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.56MB] [CPU: ▼18.45ms] Passed 4 tests

Server-side resources used by Page/Post Specific Social Share Buttons
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0731.17 ▼14.64
Dashboard /wp-admin3.45 ▲0.1450.86 ▼3.79
Posts /wp-admin/edit.php3.50 ▲0.1449.53 ▼3.11
Add New Post /wp-admin/post-new.php3.30 ▼2.5937.59 ▼52.24
Media Library /wp-admin/upload.php3.37 ▲0.1437.37 ▲4.83
Page/Post Specific Social Share /wp-admin/options-general.php?page=ppss-social-share3.3231.98

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 7 new options
New WordPress options
ppss_social_share
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Page/Post Specific Social Share Buttons: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,176 ▲41519.38 ▲5.1182.01 ▲80.2659.17 ▲13.82
Dashboard /wp-admin2,202 ▲225.64 ▼0.0288.52 ▲0.0141.83 ▼1.72
Posts /wp-admin/edit.php2,104 ▲42.01 ▲0.0536.05 ▼0.8834.56 ▼1.37
Add New Post /wp-admin/post-new.php6,238 ▲4,71226.06 ▲2.24868.17 ▲253.7453.56 ▼2.64
Media Library /wp-admin/upload.php1,401 ▲14.18 ▼0.07106.69 ▲2.5946.07 ▲0.44
Page/Post Specific Social Share /wp-admin/options-general.php?page=ppss-social-share1,2192.1324.1038.27

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=ppss-social-share
    • > Notice in wp-content/plugins/pagepost-specific-social-share-buttons/ppss_admin_page.php+257
    Undefined index: twitter_id
    • > GET request to /wp-admin/options-general.php?page=ppss-social-share
    • > Notice in wp-content/plugins/pagepost-specific-social-share-buttons/ppss_admin_page.php+262
    Undefined index: custom_code

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pagepost-specific-social-share-buttons/ppss_admin_page.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pagepost-specific-social-share-buttons/ppss_admin_page.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pagepost-specific-social-share-buttons/ppss_admin_page.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
3 plugin tags: page specific social share buttons, pagepost specific social share buttons, post specific social share buttons

pagepost-specific-social-share-buttons/page-post-specific-social-share.php 92% from 13 tests

This is the main PHP file of "Page/Post Specific Social Share Buttons" version 2.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("pagepost-specific-social-share-buttons.php" instead of "page-post-specific-social-share.php")

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 plugin788 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP310811770
CSS10018

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.72
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%
Functions20
▷ Named functions20100.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
3 PNG files occupy 0.28MB with 0.17MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png35.17KB16.17KB▼ 54.02%
screenshot-1.png160.25KB55.50KB▼ 65.37%
screenshot-3.png94.40KB34.60KB▼ 63.35%