78% buddypress-shortcodes

Code Review | BuddyPress Shortcodes

WordPress plugin BuddyPress Shortcodes scored78%from 54 tests.

About plugin

  • Plugin page: buddypress-shortc...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-3.4
  • WordPress version: 6.3.1
  • First release: May 29, 2015
  • Latest release: May 31, 2015
  • Number of updates: 7
  • Update frequency: every 0.3 days
  • Top authors: Webimetry Solutions (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

200+ active /11,860 total downloads

Benchmarks

Plugin footprint 83% 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.01MB] [CPU: ▼0.71ms] Passed 4 tests

Server-side resources used by BuddyPress Shortcodes
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0143.59 ▼0.38
Dashboard /wp-admin3.32 ▲0.0147.08 ▼0.87
Posts /wp-admin/edit.php3.37 ▲0.0149.20 ▲2.82
Add New Post /wp-admin/post-new.php5.90 ▲0.0184.64 ▼4.42
Media Library /wp-admin/upload.php3.24 ▲0.0136.79 ▲4.91
BuddyPress Shortcodes /wp-admin/options-general.php?page=buddypress-shortcodes/inc/settings.php3.2030.88

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

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

Browser metrics Passed 4 tests

A check of browser resources used by BuddyPress Shortcodes
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.61 ▼0.761.75 ▼0.4041.88 ▼6.26
Dashboard /wp-admin2,210 ▲194.86 ▼1.04111.10 ▲5.5644.14 ▼1.57
Posts /wp-admin/edit.php2,093 ▲71.98 ▼0.0339.82 ▲2.9036.26 ▼0.42
Add New Post /wp-admin/post-new.php1,536 ▲823.36 ▲5.17610.97 ▼6.3053.18 ▲0.42
Media Library /wp-admin/upload.php1,392 ▲44.20 ▲0.0195.20 ▼3.8840.41 ▼2.70
BuddyPress Shortcodes /wp-admin/options-general.php?page=buddypress-shortcodes/inc/settings.php8072.0626.9927.72

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
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 50% from 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 0% 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 fix the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/buddypress-shortcodes/inc/form.php
  • 9× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/buddypress-shortcodes/inc/shortcodes/members-carousel.php:84
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/buddypress-shortcodes/inc/shortcodes/activity.php:41
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/buddypress-shortcodes/inc/shortcodes/members-grid.php:60
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/buddypress-shortcodes/inc/shortcodes/activity-carousel.php:70
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/buddypress-shortcodes/buddypress-shortcodes.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/buddypress-shortcodes/inc/shortcodes/groups-grid.php:52
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/buddypress-shortcodes/inc/shortcodes.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/buddypress-shortcodes/inc/shortcodes/groups-carousel.php:76
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/buddypress-shortcodes/inc/settings.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (BuddyPress Shortcodes Button), #2 (Modal Window to build Shortcodes)
You can take inspiration from this readme.txt

buddypress-shortcodes/buddypress-shortcodes.php Passed 13 tests

Analyzing the main PHP file in "BuddyPress Shortcodes" version 1.2
76 characters long description:
Buddypress Shortcodes plugin adds functionality of Shortcodes to Buddypress.

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
Everything looks great! No dangerous files found in this plugin804 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP106262674
JavaScript3029103
CSS301927

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

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
3 PNG files occupy 0.07MB with 0.05MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/images/icon.png14.53KB0.69KB▼ 95.25%
screenshot-2.png33.03KB12.38KB▼ 62.52%
screenshot-1.png20.40KB8.43KB▼ 58.68%