84% social-share-for-devs

Code Review | Social Share for Devs

WordPress plugin Social Share for Devs scored84%from 54 tests.

About plugin

  • Plugin page: social-share-for-...
  • Plugin version: 1.0.7
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.1
  • WordPress version: 6.3.1
  • First release: Nov 17, 2022
  • Latest release: May 3, 2023
  • Number of updates: 16
  • Update frequency: every 10.6 days
  • Top authors: wcanvas (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /413 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.23MB] [CPU: ▼2.32ms] Passed 4 tests

Analyzing server-side resources used by Social Share for Devs
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.67 ▲0.2145.08 ▲6.92
Dashboard /wp-admin3.59 ▲0.2548.12 ▼10.74
Posts /wp-admin/edit.php3.64 ▲0.2950.72 ▲4.80
Add New Post /wp-admin/post-new.php6.11 ▲0.2382.15 ▼7.29
Media Library /wp-admin/upload.php3.45 ▲0.2338.20 ▲3.94

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 175 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

Social Share for Devs: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,842 ▲10713.25 ▼1.331.75 ▲0.1643.67 ▼6.43
Dashboard /wp-admin2,251 ▲605.89 ▲0.98101.46 ▲1.0438.84 ▼9.30
Posts /wp-admin/edit.php2,134 ▲452.06 ▲0.0646.01 ▲8.7735.04 ▲1.46
Add New Post /wp-admin/post-new.php1,543 ▲2423.28 ▲0.50668.29 ▼11.2258.76 ▼6.58
Media Library /wp-admin/upload.php1,430 ▲424.21 ▼0.03102.56 ▼6.5648.35 ▲1.34

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
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
  • 55× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\ResponseInterface' not found in wp-content/plugins/social-share-for-devs/vendor/guzzlehttp/psr7/src/Response.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/social-share-for-devs/templates/admin/input.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Promise\\RejectionException' not found in wp-content/plugins/social-share-for-devs/vendor/guzzlehttp/promises/src/AggregateException.php:8
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/plugin.php' (include_path='.:/usr/share/php') in wp-content/plugins/social-share-for-devs/src/Updates.php on line 14
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Promise\\PromiseInterface' not found in wp-content/plugins/social-share-for-devs/vendor/guzzlehttp/promises/src/RejectedPromise.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/social-share-for-devs/vendor/guzzlehttp/psr7/src/PumpStream.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\RequestException' not found in wp-content/plugins/social-share-for-devs/vendor/guzzlehttp/guzzle/src/Exception/TooManyRedirectsException.php:5
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Promise\\TaskQueueInterface' not found in wp-content/plugins/social-share-for-devs/vendor/guzzlehttp/promises/src/TaskQueue.php:14
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Exception\\GuzzleException' not found in wp-content/plugins/social-share-for-devs/vendor/guzzlehttp/guzzle/src/Exception/TransferException.php:5
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/social-share-for-devs/vendor/guzzlehttp/psr7/src/CachingStream.php:13

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

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: facebook, twitter, instagram, social, sharing

social-share-for-devs/social-share-for-devs.php 92% from 13 tests

Analyzing the main PHP file in "Social Share for Devs" version 1.0.7
It is important to fix the following:
  • Requires PHP: Required version does not match the one declared in readme.txt ("7.0" instead of "7.2")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin15,221 lines of code in 162 files:
LanguageFilesBlank linesComment linesLines of code
PHP1282,1196,02410,490
Markdown151,27803,664
JSON9001,040
SVG80019
YAML1007
CSS1001

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 issues
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity13.03
▷ Minimum class complexity1.00
▷ Maximum class complexity88.00
Average method complexity2.78
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces13
Interfaces26
Traits3
Classes82
▷ Abstract classes00.00%
▷ Concrete classes82100.00%
▷ Final classes3542.68%
Methods769
▷ Static methods14518.86%
▷ Public methods65184.66%
▷ Protected methods40.52%
▷ Private methods11414.82%
Functions124
▷ Named functions3427.42%
▷ Anonymous functions9072.58%
Constants63
▷ Global constants00.00%
▷ Class constants63100.00%
▷ Public constants5282.54%

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