78% smart-threema

Code Review | Smart Threema

WordPress plugin Smart Threema scored78%from 54 tests.

About plugin

  • Plugin page: smart-threema
  • Plugin version: 2.3.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.3.1
  • WordPress version: 6.3.1
  • First release: Feb 5, 2019
  • Latest release: Oct 10, 2023
  • Number of updates: 26
  • Update frequency: every 65.7 days
  • Top authors: Annubis (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /1,531 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.11MB] [CPU: ▼7.40ms] Passed 4 tests

A check of server-side resources used by Smart Threema
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1238.46 ▲0.14
Dashboard /wp-admin3.41 ▲0.1043.28 ▲0.12
Posts /wp-admin/edit.php3.53 ▲0.1646.02 ▲1.01
Add New Post /wp-admin/post-new.php5.99 ▲0.1081.77 ▼30.08
Media Library /wp-admin/upload.php3.33 ▲0.1035.48 ▲0.23
Smart Threema /wp-admin/options-general.php?page=QGA_threemasmart3.3031.34

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Smart Threema
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3414.54 ▲0.181.61 ▲0.1041.00 ▲2.12
Dashboard /wp-admin2,199 ▲185.63 ▼0.0985.18 ▼14.0438.65 ▼4.58
Posts /wp-admin/edit.php2,104 ▲42.02 ▲0.0339.37 ▲3.2635.33 ▼2.67
Add New Post /wp-admin/post-new.php1,531 ▼723.16 ▼0.09672.70 ▲14.0558.77 ▼5.36
Media Library /wp-admin/upload.php1,401 ▲14.20 ▼0.1192.80 ▼19.7041.53 ▼5.37
Smart Threema /wp-admin/options-general.php?page=QGA_threemasmart1,0182.2025.0726.75

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
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 50% 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 0% 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 perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/smart-threema/css/threemasmart_floating_button.php
  • 5× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/smart-threema/shortcode.php:93
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/smart-threema/shortcode_design2.php:53
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/smart-threema/shortcode_design1.php:53
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/smart-threema/add_to_content.php:166
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/smart-threema/floating-button.php:8

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention: The official readme.txt might help

smart-threema/threema.php 85% from 13 tests

The main PHP script in "Smart Threema" version 2.3.5 is automatically included on every request by WordPress
It is important to fix the following:
  • Requires at least: Required version does not match the one declared in readme.txt ("4.0.1" instead of "3.5")
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("smart-threema.php" instead of "threema.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin1,057 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP10315125544
PO File4136144439
CSS122374

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.35
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%
Functions17
▷ Named functions17100.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
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/floating-button-threema.png5.87KB3.41KB▼ 41.83%
images/floating-button-threema-klein.png3.00KB2.21KB▼ 26.47%