10% smart-tribune-addsnippet

Code Review | Smart Tribune for Wordpress

WordPress plugin Smart Tribune for Wordpress scored10%from 54 tests.

About plugin

  • Plugin page: smart-tribune-add...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7+
  • WordPress version: 6.3.1
  • First release: Mar 11, 2013
  • Latest release: Apr 18, 2013
  • Number of updates: 7
  • Update frequency: every 9.7 days
  • Top authors: samail (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /805 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
These installer errors require your attention
  • This plugin did not install gracefully
    • > User deprecated in wp-includes/functions.php+5747
    Function load_plugin_textdomain was called with an argument that is deprecated since version 2.7.0 with no alternative available.

Server metrics [RAM: ▼1.96MB] [CPU: ▼51.11ms] Passed 4 tests

Analyzing server-side resources used by Smart Tribune for Wordpress
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.444.37 ▼34.33
Dashboard /wp-admin2.05 ▼1.265.90 ▼40.63
Posts /wp-admin/edit.php2.05 ▼1.315.57 ▼38.95
Add New Post /wp-admin/post-new.php2.05 ▼3.845.73 ▼90.53
Media Library /wp-admin/upload.php2.05 ▼1.186.56 ▼26.78
Smart Tribune AddSnippet /wp-admin/options-general.php?page=smarttribune-addsnippet2.055.77

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

Smart Tribune for Wordpress: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,809 ▲6313.59 ▼0.791.54 ▼0.0539.13 ▼0.60
Dashboard /wp-admin2,212 ▲245.81 ▲0.9294.80 ▼7.4540.25 ▼1.13
Posts /wp-admin/edit.php2,097 ▲112.04 ▲0.0136.14 ▲1.6434.34 ▼2.89
Add New Post /wp-admin/post-new.php1,550 ▲3618.23 ▲0.73590.53 ▼86.5151.65 ▼6.11
Media Library /wp-admin/upload.php1,400 ▲124.23 ▼0.06100.08 ▲3.4641.16 ▼4.23
Smart Tribune AddSnippet /wp-admin/options-general.php?page=smarttribune-addsnippet8182.1422.2325.66

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The plugin did not uninstall gracefully
    • > User deprecated in wp-includes/functions.php+5747
    Function load_plugin_textdomain was called with an argument that is deprecated since version 2.7.0 with no alternative available.
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=smarttribune-addsnippet
    • > User deprecated in wp-includes/functions.php+5747
    Function load_plugin_textdomain was called with an argument that is deprecated since version 2.7.0 with no alternative available.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=smarttribune-addsnippet
    • > Notice in wp-content/plugins/smart-tribune-addsnippet/smarttribune-addsnippet.php+88
    Undefined variable: st_domain
    • > GET request to /wp-admin/options-general.php?page=smarttribune-addsnippet
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=smarttribune-addsnippet
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

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
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/smart-tribune-addsnippet/smarttribune-addsnippet.php:31

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 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
Attributes that need to be fixed:
  • Tested up to: Invalid plugin version format
  • Screenshots: These screenshots do not have images: #1 (Screenshot-1.png - Smart Tribune remote feedback form to link to your website/application), #2 (Screenshot-2.png - A fully customizable platform to aggregate all feedbacks and engage your community), #3 (Screenshot-3.png - Smart Tribune administrative interface to manage your content and settings), #4 (Screenshot-4.png - Button setting section to define your button preferences.)
The official readme.txt is a good inspiration

smart-tribune-addsnippet/smarttribune-addsnippet.php 92% from 13 tests

The entry point to "Smart Tribune for Wordpress" version 1.0 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("smart-tribune-addsnippet.php" instead of "smarttribune-addsnippet.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected56 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1122256

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.47
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 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
4 PNG files occupy 0.72MB with 0.47MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png185.47KB65.23KB▼ 64.83%
screenshot-1.png185.47KB65.23KB▼ 64.83%
screenshot-3.png185.47KB65.23KB▼ 64.83%
screenshot-4.png185.47KB65.23KB▼ 64.83%