84% social-share-from-admin

Code Review | Social Share

WordPress plugin Social Share scored84%from 54 tests.

About plugin

  • Plugin page: social-share-from...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3+
  • WordPress version: 6.3.1
  • First release: Feb 12, 2016
  • Latest release: Mar 3, 2016
  • Number of updates: 4
  • Update frequency: every 5.3 days
  • Top authors: hamlid (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /540 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼4.19ms] Passed 4 tests

An overview of server-side resources used by Social Share
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0143.69 ▼1.72
Dashboard /wp-admin3.32 ▲0.0147.43 ▼9.60
Posts /wp-admin/edit.php3.37 ▲0.0153.98 ▼2.70
Add New Post /wp-admin/post-new.php5.90 ▲0.01100.26 ▼1.78
Media Library /wp-admin/upload.php3.24 ▲0.0136.11 ▼2.68

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Social Share
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.24 ▼0.111.61 ▼0.2144.39 ▲0.26
Dashboard /wp-admin2,192 ▲155.62 ▼0.0592.81 ▲1.0341.22 ▼0.00
Posts /wp-admin/edit.php2,122 ▲191.98 ▼0.0239.41 ▲1.2935.70 ▲0.71
Add New Post /wp-admin/post-new.php1,536 ▲1023.19 ▲0.03611.40 ▲13.0748.90 ▼2.10
Media Library /wp-admin/upload.php1,397 ▼34.24 ▼0.1597.78 ▼12.5547.05 ▼2.82

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • 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 | 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
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/social-share-from-admin/social-share-from-admin.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

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
6 plugin tags: g, twitter, share, xing, facebook...

social-share-from-admin/social-share-from-admin.php 92% from 13 tests

The primary PHP file in "Social Share" version 1.1 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 238 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin21 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP15921

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.11
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%
Functions2
▷ Named functions2100.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
No PNG files were detected