84% tiny-desk-pixel

Code Review | Tiny Desk Pixel

WordPress plugin Tiny Desk Pixel scored84%from 54 tests.

About plugin

  • Plugin page: tiny-desk-pixel
  • Plugin version: 1.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.2
  • WordPress version: 6.3.1
  • First release: Jun 15, 2019
  • Latest release: Dec 5, 2019
  • Number of updates: 7
  • Update frequency: every 24.9 days
  • Top authors: thetinydesk (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /529 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

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

This is a short check of server-side resources used by Tiny Desk Pixel
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0235.34 ▼0.53
Dashboard /wp-admin3.32 ▼0.0248.53 ▼9.27
Posts /wp-admin/edit.php3.37 ▲0.0242.21 ▼4.63
Add New Post /wp-admin/post-new.php5.92 ▲0.0478.36 ▼22.51
Media Library /wp-admin/upload.php3.25 ▲0.0230.63 ▼7.81
Tiny Desk Pixel /wp-admin/options-general.php?page=tiny-desk-pixel3.2129.40

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Tiny Desk Pixel
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,908 ▲16213.42 ▼1.118.45 ▲6.8041.00 ▲1.80
Dashboard /wp-admin2,197 ▲205.55 ▼0.1080.48 ▼3.9437.35 ▼6.11
Posts /wp-admin/edit.php2,108 ▲112.16 ▲0.2033.52 ▼2.2634.70 ▼0.05
Add New Post /wp-admin/post-new.php1,533 ▲523.58 ▲0.44687.58 ▼2.6655.14 ▼0.80
Media Library /wp-admin/upload.php1,408 ▲84.17 ▲0.0598.44 ▼22.5541.49 ▼6.96
Tiny Desk Pixel /wp-admin/options-general.php?page=tiny-desk-pixel8042.0022.7527.39

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
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% 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 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/tiny-desk-pixel/admin/partials/tiny-desk-pixel-admin-display.php
    • > /wp-content/plugins/tiny-desk-pixel/public/partials/tiny-desk-pixel-public-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% 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
These attributes need to be fixed:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === tiny-desk-pixel === )
  • Donate link: Invalid URI ("www.thetradedesk.com")
You can take inspiration from this readme.txt

tiny-desk-pixel/tiny-desk-pixel.php Passed 13 tests

This is the main PHP file of "Tiny Desk Pixel" version 1.0.5, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
104 characters long description:
It helps you add easily your tracking tag from Tiny Desk by just giving your advertiser id and pixel id.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin265 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12122574238
JavaScript232727
CSS2080

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity2.57
▷ Minimum class complexity1.00
▷ Maximum class complexity9.00
Average method complexity1.38
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods29
▷ Static methods26.90%
▷ Public methods2482.76%
▷ Protected methods00.00%
▷ Private methods517.24%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected