84% stacktack

Code Review | StackTack

WordPress plugin StackTack scored84%from 54 tests.

About plugin

  • Plugin page: stacktack
  • Plugin version: 1.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.4.2
  • WordPress version: 6.3.1
  • First release: Mar 19, 2012
  • Latest release: Dec 1, 2012
  • Number of updates: 11
  • Update frequency: every 23.4 days
  • Top authors: george_edison (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,524 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.03MB] [CPU: ▼1.91ms] Passed 4 tests

A check of server-side resources used by StackTack
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0337.27 ▼3.48
Dashboard /wp-admin3.33 ▲0.0343.46 ▼3.90
Posts /wp-admin/edit.php3.38 ▲0.0346.85 ▼0.94
Add New Post /wp-admin/post-new.php5.93 ▲0.0492.33 ▲5.93
Media Library /wp-admin/upload.php3.25 ▲0.0232.78 ▲0.69
StackTack /wp-admin/options-general.php?page=stacktack-options3.2331.03

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for StackTack
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,981 ▲23513.62 ▼0.695.28 ▲3.4740.08 ▼5.30
Dashboard /wp-admin2,296 ▲1085.89 ▼0.01107.61 ▲9.3843.47 ▼4.20
Posts /wp-admin/edit.php2,185 ▲962.06 ▲0.0141.25 ▲4.3535.41 ▲1.26
Add New Post /wp-admin/post-new.php1,606 ▲7322.96 ▼0.09598.82 ▼97.6661.62 ▲10.85
Media Library /wp-admin/upload.php1,481 ▲934.21 ▼0.0799.69 ▲5.2441.48 ▼1.44
StackTack /wp-admin/options-general.php?page=stacktack-options9582.0725.8825.99

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These 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 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/stacktack/stacktack.php:162
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/stacktack/stacktack_options.php:21

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Screenshots: Add images for these screenshots: #1 (StackTack icon in the editing toolbar.), #2 (An instance of StackTack in a post.)
You can take inspiration from this readme.txt

stacktack/stacktack.php Passed 13 tests

This is the main PHP file of "StackTack" version 1.2.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
96 characters long description:
A WordPress plugin that makes it easy to embed questions from Stack Exchange sites in your blog.

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 detected346 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP23254188
JavaScript46666124
CSS2121434

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity1.78
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods9100.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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
4 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/icon.png1.38KB1.33KB▼ 3.12%
screenshot-1.png3.72KB2.56KB▼ 31.12%
tinymce/button.png0.68KB0.61KB▼ 9.94%
screenshot-2.png25.85KB13.46KB▼ 47.94%