82% tnc-toolbox

Code Review | TNC Toolbox

WordPress plugin TNC Toolbox scored 82% from 54 tests.

About plugin

  • Plugin page: tnc-toolbox
  • Plugin version: 1.3.4
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Apr 1, 2023
  • Latest release: Jun 14, 2023
  • Number of updates: 9
  • Update frequency: every 8.3 days
  • Top authors: leopardhost (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

900+ active / 2,081 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.12MB] [CPU: ▲3.47ms] Passed 4 tests

Server-side resources used by TNC Toolbox
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1248.82 ▲7.60
Dashboard /wp-admin3.42 ▲0.1248.76 ▼3.00
Posts /wp-admin/edit.php3.53 ▲0.1854.92 ▲10.74
Add New Post /wp-admin/post-new.php6.00 ▲0.1198.55 ▲3.35
Media Library /wp-admin/upload.php3.34 ▲0.1139.62 ▲5.94
TNC Toolbox /wp-admin/options-general.php?page=tnc_toolbox3.2832.69

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
db_upgraded
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by TNC Toolbox
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,866 ▲13113.25 ▼0.971.75 ▼0.3246.46 ▼3.42
Dashboard /wp-admin2,236 ▲455.84 ▲0.9896.76 ▼6.8874.15 ▲33.16
Posts /wp-admin/edit.php2,119 ▲301.99 ▼0.0138.88 ▼1.3835.86 ▲2.47
Add New Post /wp-admin/post-new.php1,534 ▲1523.22 ▲0.10722.42 ▲41.7254.66 ▼5.56
Media Library /wp-admin/upload.php1,418 ▲304.21 ▲0.0196.76 ▼9.6974.03 ▲28.79
TNC Toolbox /wp-admin/options-general.php?page=tnc_toolbox8662.0525.3531.69

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% 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)
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=tnc_toolbox
    • > Warning in wp-content/plugins/tnc-toolbox/core/includes/classes/class-tnc-wp-toolbox-settings.php+199
    file_get_contents(wp-content/tnc-toolbox-config/cpanel-api-key): failed to open stream: No such file or directory
    • > GET request to /wp-admin/options-general.php?page=tnc_toolbox
    • > Warning in wp-content/plugins/tnc-toolbox/core/includes/classes/class-tnc-wp-toolbox-settings.php+203
    file_get_contents(wp-content/tnc-toolbox-config/cpanel-username): failed to open stream: No such file or directory
    • > GET request to /wp-admin/options-general.php?page=tnc_toolbox
    • > Warning in wp-content/plugins/tnc-toolbox/core/includes/classes/class-tnc-wp-toolbox-settings.php+207
    file_get_contents(wp-content/tnc-toolbox-config/server-hostname): failed to open stream: No such file or directory

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 76% from 29 tests

readme.txt 63% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Contributors: The plugin contributors field is missing
  • Requires at least: Invalid plugin version format
  • Requires php: Invalid plugin version format
  • Tags: Please add at least on tag
  • Donate link: Invalid URI found ("")
  • Contributors: Please add at least on tag
You can look at the official readme.txt

tnc-toolbox/tnc-wp-toolbox.php 92% from 13 tests

The primary PHP file in "TNC Toolbox" version 1.3.4 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("tnc-toolbox.php" instead of "tnc-wp-toolbox.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin423 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP681436423

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity9.50
▷ Minimum class complexity1.00
▷ Maximum class complexity21.00
Average method complexity2.13
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes125.00%
Methods30
▷ Static methods13.33%
▷ Public methods2583.33%
▷ Protected methods00.00%
▷ Private methods516.67%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/tnc-icon.png7.56KB3.44KB▼ 54.51%