84% social-shortcodes

Code Review | Social Shortcodes

WordPress plugin Social Shortcodes scored84%from 54 tests.

About plugin

  • Plugin page: social-shortcodes
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-4.5.2
  • WordPress version: 6.3.1
  • First release: Jun 27, 2016
  • Latest release: Jun 27, 2016
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: timwright12 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,753 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼4.73ms] Passed 4 tests

A check of server-side resources used by Social Shortcodes
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0236.94 ▼9.74
Dashboard /wp-admin3.34 ▲0.0347.47 ▲0.47
Posts /wp-admin/edit.php3.39 ▲0.0346.78 ▼4.20
Add New Post /wp-admin/post-new.php5.92 ▲0.0385.69 ▼5.43
Media Library /wp-admin/upload.php3.26 ▲0.0337.50 ▲4.46
Social Shortcodes /wp-admin/options-general.php?page=social_shortcodes3.2335.22

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Social Shortcodes
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3414.10 ▼0.431.64 ▼0.4641.88 ▼8.08
Dashboard /wp-admin2,202 ▲225.57 ▼0.0583.48 ▼4.0335.98 ▼2.69
Posts /wp-admin/edit.php2,104 ▲41.99 ▼0.0237.46 ▼1.1134.08 ▼0.34
Add New Post /wp-admin/post-new.php1,537 ▲918.28 ▼4.56623.75 ▼4.21115.49 ▲53.13
Media Library /wp-admin/upload.php1,404 ▲134.13 ▼0.1595.88 ▼3.5940.31 ▼1.20
Social Shortcodes /wp-admin/options-general.php?page=social_shortcodes8082.0025.1325.95

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for 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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/social-shortcodes/index.php:99

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
3 plugin tags: social, shortcodes, twitter

social-shortcodes/index.php 92% from 13 tests

The entry point to "Social Shortcodes" version 0.1 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("social-shortcodes.php" instead of "index.php")

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
No dangerous file extensions were detected550 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP4122177438
CSS122292
SVG40420

PHP code Passed 2 tests

This is a short overview 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.31
Average class complexity15.50
▷ Minimum class complexity7.00
▷ Maximum class complexity30.00
Average method complexity3.15
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods27
▷ Static methods518.52%
▷ Public methods2592.59%
▷ Protected methods00.00%
▷ Private methods27.41%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected