90% select-to-share

Code Review | Select to Share

WordPress plugin Select to Share scored90%from 54 tests.

About plugin

  • Plugin page: select-to-share
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.4
  • WordPress version: 6.3.1
  • First release: Oct 27, 2015
  • Latest release: Dec 17, 2015
  • Number of updates: 10
  • Update frequency: every 5.2 days
  • Top authors: seebeen (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

30+ active /1,667 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

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

Analyzing server-side resources used by Select to Share
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0134.99 ▼1.34
Dashboard /wp-admin3.33 ▼0.0145.00 ▼16.59
Posts /wp-admin/edit.php3.38 ▲0.0349.31 ▲4.63
Add New Post /wp-admin/post-new.php5.91 ▲0.0279.35 ▼21.12
Media Library /wp-admin/upload.php3.25 ▲0.0237.47 ▲7.71

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Select to Share
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.22 ▼1.151.68 ▼0.0340.69 ▼1.09
Dashboard /wp-admin2,203 ▲185.88 ▲0.06109.55 ▲8.7439.78 ▼2.82
Posts /wp-admin/edit.php2,089 ▲32.06 ▲0.0239.65 ▲4.2334.92 ▼1.98
Add New Post /wp-admin/post-new.php1,528 ▲1418.24 ▼5.37587.71 ▼67.4570.73 ▲18.25
Media Library /wp-admin/upload.php1,388 ▼34.18 ▼0.0298.23 ▲1.2542.15 ▼2.26

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

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (Plugin in action on desktop and Mobile), #2 (CSS selector settings in admin panel)
Please take inspiration from this readme.txt

select-to-share/select-to-share.php Passed 13 tests

The main PHP file in "Select to Share" ver. 1.0.1 adds more information about the plugin and also serves as the entry point for this plugin
125 characters long description:
Display a nice pop-over menu with sharing buttons for Facebook, Twitter, LinkedIN and e-mail over selected text in your post.

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
Good job! No executable or dangerous file extensions detected580 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript16129269
CSS12910181
PHP343114130

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity3.00
▷ Minimum class complexity2.00
▷ Maximum class complexity4.00
Average method complexity1.44
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.09MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png12.50KB6.18KB▼ 50.57%
screenshot-1.png75.12KB78.09KB0.00%