10% tbm-google-url-shortener

Code Review | TBM Google URL Shortener

WordPress plugin TBM Google URL Shortener scored10%from 54 tests.

About plugin

  • Plugin page: tbm-google-url-sh...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9.4
  • WordPress version: 6.3.1
  • First release: Mar 21, 2018
  • Latest release: Mar 21, 2018
  • Number of updates: 2
  • Update frequency: every 2.5 days
  • Top authors: harshvyas (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /466 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
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/tbm-google-url-shortener/tbm-google-url-shortener.php+41
    Methods with the same name as their class will not be constructors in a future version of PHP; GoogleUrlApi has a deprecated constructor

Server metrics [RAM: ▼0.01MB] [CPU: ▼9.75ms] Passed 4 tests

Server-side resources used by TBM Google URL Shortener
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0041.41 ▼2.30
Dashboard /wp-admin3.31 ▼0.0452.31 ▼13.13
Posts /wp-admin/edit.php3.36 ▲0.0046.11 ▼11.60
Add New Post /wp-admin/post-new.php5.89 ▲0.0084.50 ▼11.97
Media Library /wp-admin/upload.php3.23 ▲0.0043.37 ▲6.20

Server storage [IO: ▲0.05MB] [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: 7 new files
Database: 1 new table, 6 new options
New tables
wp_tbmurlshortener
New WordPress options
db_upgraded
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

TBM Google URL Shortener: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5814.26 ▲0.121.73 ▲0.0044.12 ▲1.38
Dashboard /wp-admin2,198 ▲185.65 ▼0.0197.55 ▲10.0875.84 ▲39.15
Posts /wp-admin/edit.php2,112 ▲122.02 ▲0.0134.30 ▼5.4236.93 ▲1.28
Add New Post /wp-admin/post-new.php1,692 ▲16622.17 ▼1.47837.96 ▲118.0555.24 ▼14.08
Media Library /wp-admin/upload.php1,418 ▲184.12 ▼0.0796.14 ▼23.3871.63 ▲21.12

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_tbmurlshortener
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests Passed 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 Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The SRP test was a success

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 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots require images: #1 (/assets/screenshot-1.png), #2 (/assets/screenshot-2.png), #3 (/assets/screenshot-3.png)
You can look at the official readme.txt

tbm-google-url-shortener/tbm-google-url-shortener.php 92% from 13 tests

This is the main PHP file of "TBM Google URL Shortener" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Description: The description should be shorter than 140 characters (currently 258 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected138 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP21116138

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
4 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
icon.png0.39KB0.52KB0.00%
assets/screenshot-2.png10.02KB6.47KB▼ 35.43%
assets/screenshot-3.png23.38KB13.36KB▼ 42.87%
assets/screenshot-1.png5.90KB3.86KB▼ 34.59%