90% tcbd-calculator

Code Review | TCBD Calculator

WordPress plugin TCBD Calculator scored90%from 54 tests.

About plugin

  • Plugin page: tcbd-calculator
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.4.2
  • WordPress version: 6.3.1
  • First release: Mar 1, 2016
  • Latest release: Mar 1, 2016
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: tcoder (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /709 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼6.69ms] Passed 4 tests

A check of server-side resources used by TCBD Calculator
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0033.92 ▼2.90
Dashboard /wp-admin3.31 ▲0.0146.33 ▼0.46
Posts /wp-admin/edit.php3.36 ▲0.0042.43 ▼2.99
Add New Post /wp-admin/post-new.php5.89 ▲0.0081.85 ▼15.03
Media Library /wp-admin/upload.php3.23 ▲0.0029.36 ▼5.84

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-posts
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for TCBD Calculator
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.72 ▲0.361.52 ▲0.0236.52 ▼5.46
Dashboard /wp-admin2,195 ▲145.64 ▼0.2382.17 ▼16.9035.51 ▼9.26
Posts /wp-admin/edit.php2,097 ▼31.95 ▼0.0634.54 ▼1.4934.29 ▲2.33
Add New Post /wp-admin/post-new.php1,526 ▼223.22 ▼0.03668.21 ▼13.8053.20 ▲1.68
Media Library /wp-admin/upload.php1,403 ▲34.21 ▲0.0494.01 ▼0.3240.84 ▼2.27

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: calculator, tcbd calculator, tcbd, wp calculator

tcbd-calculator/plugin.php 92% from 13 tests

This is the main PHP file of "TCBD Calculator" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("tcbd-calculator.php" instead of "plugin.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 detected348 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript200181
PHP12227122
CSS19045

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.21
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%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
js/icon.png3.09KB3.23KB0.00%