89% cosmosfarm-share-buttons

Code Review | 소셜 공유 버튼 By 코스모스팜

WordPress plugin 소셜 공유 버튼 By 코스모스팜 scored89%from 54 tests.

About plugin

  • Plugin page: cosmosfarm-share-...
  • Plugin version: 1.9
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.8.2
  • WordPress version: 6.3.1
  • First release: May 27, 2016
  • Latest release: Dec 2, 2021
  • Number of updates: 26
  • Update frequency: every 77.5 days
  • Top authors: cosmosfarm (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

2,000+ active /14,899 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.08MB] [CPU: ▼4.37ms] 75% from 4 tests

This is a short check of server-side resources used by 소셜 공유 버튼 By 코스모스팜
Please take the time to fix the following items
  • CPU: Total CPU usage must kept under 500.00ms (currently 5,041.72ms on /wp-admin/options-general.php?page=cosmosfarm-share-buttons)
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1143.67 ▲1.85
Dashboard /wp-admin3.39 ▲0.0447.31 ▼13.04
Posts /wp-admin/edit.php3.50 ▲0.1551.89 ▲5.81
Add New Post /wp-admin/post-new.php5.97 ▲0.0883.82 ▼12.08
Media Library /wp-admin/upload.php3.31 ▲0.0839.47 ▲5.97
소셜 공유 버튼 /wp-admin/options-general.php?page=cosmosfarm-share-buttons3.385,041.72

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for 소셜 공유 버튼 By 코스모스팜
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,909 ▲16313.82 ▼0.8014.06 ▲12.2139.24 ▼9.59
Dashboard /wp-admin2,202 ▲255.69 ▲0.0182.55 ▼7.0040.93 ▲1.57
Posts /wp-admin/edit.php2,101 ▲11.99 ▲0.0034.07 ▼2.9840.17 ▲4.50
Add New Post /wp-admin/post-new.php1,540 ▲1418.23 ▼5.36659.58 ▼14.7166.94 ▲13.04
Media Library /wp-admin/upload.php1,401 ▲44.23 ▲0.0398.97 ▲2.3844.29 ▼0.71
소셜 공유 버튼 /wp-admin/options-general.php?page=cosmosfarm-share-buttons1,6463.3447.8778.21

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

cosmosfarm-share-buttons/cosmosfarm-share-buttons.php Passed 13 tests

The principal PHP file in "소셜 공유 버튼 By 코스모스팜" v. 1.9 is loaded by WordPress automatically on each request
47 characters long description:
국내외 SNS 공유 버튼을 제공합니다.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected810 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP68024655
JavaScript11389
PO File121041141
CSS15325

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity13.33
▷ Minimum class complexity5.00
▷ Maximum class complexity28.00
Average method complexity2.95
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes266.67%
Methods19
▷ Static methods00.00%
▷ Public methods1894.74%
▷ Protected methods00.00%
▷ Private methods15.26%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
20 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
layout/default/images/icon-band.png3.22KB1.55KB▼ 51.94%
layout/default/images/icon-kakaostory.png2.27KB1.47KB▼ 35.28%
layout/default/images/icon-twitter.png1.99KB0.51KB▼ 74.23%
layout/default/images/icon-twitter-32.png1.52KB0.63KB▼ 58.29%
layout/default/images/icon-google.png2.22KB0.63KB▼ 71.69%