84% tubaret-network-share-button

Code Review | Tubaret Network Share plugin for Wordpress

WordPress plugin Tubaret Network Share plugin for Wordpress scored84%from 54 tests.

About plugin

  • Plugin page: tubaret-network-s...
  • Plugin version: 1.03
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-3.9.1
  • WordPress version: 6.3.1
  • First release: Jul 3, 2014
  • Latest release: Jul 23, 2014
  • Number of updates: 11
  • Update frequency: every 2.2 days
  • Top authors: Estopero (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /609 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.00MB] [CPU: ▼7.44ms] Passed 4 tests

This is a short check of server-side resources used by Tubaret Network Share plugin for Wordpress
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0143.02 ▲1.84
Dashboard /wp-admin3.32 ▼0.0240.51 ▼20.87
Posts /wp-admin/edit.php3.38 ▲0.0247.89 ▲1.20
Add New Post /wp-admin/post-new.php5.91 ▲0.0281.90 ▼11.92
Media Library /wp-admin/upload.php3.25 ▲0.0136.21 ▲2.79
Tubaret Network /wp-admin/options-general.php?page=tubaret-network-share-button3.2226.62

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 10 new options
New WordPress options
tbr_wp_size
tbr_wp_position_vert
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-comments
tbr_wp_position_horiz
theysaidso_admin_options
tbr_wp_site

Browser metrics Passed 4 tests

Tubaret Network Share plugin for Wordpress: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲5913.30 ▼1.281.50 ▼0.1337.32 ▼6.28
Dashboard /wp-admin2,210 ▲225.86 ▲0.97110.75 ▼5.8042.17 ▼4.09
Posts /wp-admin/edit.php2,096 ▲72.05 ▲0.0538.85 ▲1.7436.12 ▼3.40
Add New Post /wp-admin/post-new.php1,536 ▲1723.36 ▼0.08674.91 ▼20.9356.98 ▼4.52
Media Library /wp-admin/upload.php1,392 ▲104.21 ▼0.0299.04 ▼4.9340.00 ▼9.07
Tubaret Network /wp-admin/options-general.php?page=tubaret-network-share-button8792.0326.1231.54

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

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
Please take a closer look at the following
  • 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function selected() in wp-content/plugins/tubaret-network-share-button/tpl/admin_page.tpl.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/tubaret-network-share-button/tpl/button_iframe.tpl.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/tubaret-network-share-button/tubaret_share_button.php:33
    • > PHP Notice
      Undefined variable: template in wp-content/plugins/tubaret-network-share-button/tpl/admin_page.tpl.php on line 2
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/tubaret-network-share-button/tpl/admin_page.tpl.php on line 2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
3 plugin tags: posts, social, plugin

tubaret-network-share-button/tubaret_share_button.php 92% from 13 tests

"Tubaret Network Share plugin for Wordpress" version 1.03's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("tubaret-network-share-button.php" instead of "tubaret_share_button.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin151 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP53040121
CSS17030

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.12
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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin