68% tinypress

Code Review | TinyPress - Shorten and Track your urls

WordPress plugin TinyPress - Shorten and Track your urls scored68%from 54 tests.

About plugin

  • Plugin page: tinypress
  • Plugin version: 1.2.1
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Feb 18, 2023
  • Latest release: Nov 16, 2023
  • Number of updates: 32
  • Update frequency: every 9.4 days
  • Top authors: pluginbazar (100%)

Code review

54 tests

User reviews

1 review

Install metrics

3,000+ active /1,002 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.36MB] [CPU: ▲4.53ms] Passed 4 tests

An overview of server-side resources used by TinyPress - Shorten and Track your urls
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.95 ▲0.4946.07 ▲7.76
Dashboard /wp-admin3.66 ▲0.3553.84 ▲9.17
Posts /wp-admin/edit.php3.74 ▲0.3853.10 ▲2.19
Add New Post /wp-admin/post-new.php6.27 ▲0.3899.79 ▲0.01
Media Library /wp-admin/upload.php3.58 ▲0.3538.33 ▲8.16
Settings /wp-admin/edit.php?post_type=tinypress_link&page=settings3.6342.48
Add Link /wp-admin/post-new.php?post_type=tinypress_link3.7554.39
All Links /wp-admin/edit.php?post_type=tinypress_link3.6546.43
Categories /wp-admin/edit-tags.php?taxonomy=tinypress_link_cat&post_type=tinypress_link3.6042.90
Logs /wp-admin/edit.php?post_type=tinypress_link&page=tinypress-logs3.6237.28

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 108 new files
Database: 1 new table, 7 new options
New tables
wp_tinypress_reports
New WordPress options
tinypress
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for TinyPress - Shorten and Track your urls
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,866 ▲10413.81 ▼0.541.72 ▲0.1138.05 ▼9.68
Dashboard /wp-admin2,262 ▲855.64 ▲0.01101.10 ▲4.0137.94 ▼4.89
Posts /wp-admin/edit.php2,385 ▲2854.59 ▲2.6592.46 ▲50.2444.31 ▲4.22
Add New Post /wp-admin/post-new.php6,329 ▲4,80319.88 ▼1.21972.34 ▲312.0148.90 ▼14.73
Media Library /wp-admin/upload.php1,461 ▲615.17 ▲0.9891.41 ▼21.4141.40 ▼1.81
Settings /wp-admin/edit.php?post_type=tinypress_link&page=settings1,4514.5870.9153.30
Add Link /wp-admin/post-new.php?post_type=tinypress_link2,0885.39130.2845.12
All Links /wp-admin/edit.php?post_type=tinypress_link1,3094.3564.3729.72
Categories /wp-admin/edit-tags.php?taxonomy=tinypress_link_cat&post_type=tinypress_link1,5364.3460.6532.57
Logs /wp-admin/edit.php?post_type=tinypress_link&page=tinypress-logs1,1604.1056.8724.59

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_tinypress_reports
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • tinypress
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 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
Please fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/tinypress/templates/admin/settings/supports.php
  • 6× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/tinypress/templates/admin/settings/browsers.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_the_ID() in wp-content/plugins/tinypress/templates/admin/analytics.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/tinypress/templates/admin/qr-code.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'WPDK_Settings_Abstract' not found in wp-content/plugins/tinypress/includes/wpdk/settings/classes/admin-options.class.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/tinypress/includes/classes/class-columns-link.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'WPDK_Settings_Abstract' not found in wp-content/plugins/tinypress/includes/wpdk/settings/classes/fields.class.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

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
These attributes need your attention:
  • Screenshots: No descriptions were found for these screenshots #10, #11, #2, #3, #4, #5, #6, #7, #8, #9 in tinypress/assets to your readme.txt
Please take inspiration from this readme.txt

tinypress/tinypress.php Passed 13 tests

The principal PHP file in "TinyPress - Shorten and Track your urls" v. 1.2.1 is loaded by WordPress automatically on each request
54 characters long description:
No more long URL, Shorten and track it with TinyPress.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin21,772 lines of code in 104 files:
LanguageFilesBlank linesComment linesLines of code
PHP863,1071,9989,319
JavaScript81,3535616,860
CSS61,0295465,496
SVG30184
Markdown18013

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.60
Average class complexity24.44
▷ Minimum class complexity1.00
▷ Maximum class complexity159.00
Average method complexity5.84
▷ Minimum method complexity1.00
▷ Maximum method complexity59.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes73
▷ Abstract classes22.74%
▷ Concrete classes7197.26%
▷ Final classes00.00%
Methods356
▷ Static methods5014.04%
▷ Public methods33894.94%
▷ Protected methods10.28%
▷ Private methods174.78%
Functions34
▷ Named functions3088.24%
▷ Anonymous functions411.76%
Constants8
▷ Global constants8100.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
includes/wpdk/settings/assets/images/checkerboard.png2.29KB2.54KB0.00%