94% milk-smart-link

Code Review | Milk smart link

WordPress plugin Milk smart link scored 94% from 54 tests.

About plugin

  • Plugin page: milk-smart-link
  • Plugin version: 0.3.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-5.2
  • WordPress version: 5.8.1
  • First release: Mar 7, 2019
  • Latest release: May 10, 2019
  • Number of updates: 9
  • Update frequency: every 7.1 days
  • Top authors: manzinello (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

300+ active / 1,373 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼143.57ms] Passed 4 tests

An overview of server-side resources used by Milk smart link
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.87 ▲0.0337.82 ▲3.04
Dashboard /wp-admin3.09 ▲0.0444.92 ▼1.41
Posts /wp-admin/edit.php3.15 ▲0.0443.64 ▼1.94
Add New Post /wp-admin/post-new.php5.46 ▲0.0387.99 ▼562.16
Media Library /wp-admin/upload.php3.04 ▲0.0332.69 ▼8.75

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 10 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Milk smart link
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,697 ▲10115.90 ▲0.2611.35 ▲2.1745.42 ▼3.65
Dashboard /wp-admin2,979 ▲455.92 ▼0.05147.03 ▼23.17130.50 ▲20.41
Posts /wp-admin/edit.php2,759 ▲202.60 ▼0.1365.21 ▼8.0289.44 ▲1.22
Add New Post /wp-admin/post-new.php1,513 ▼7818.41 ▼0.32397.99 ▼2.34116.24 ▲9.21
Media Library /wp-admin/upload.php1,770 ▼375.02 ▼0.03140.26 ▼10.45136.69 ▲15.00

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means 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
The following issues need your attention
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Notice
      Undefined index: HTTP_USER_AGENT in wp-content/plugins/milk-smart-link/inc/os.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/milk-smart-link/inc/admin.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
7 plugin tags: android, landing page, google play, redirect, app store...

milk-smart-link/milk-smart-link.php Passed 13 tests

This is the main PHP file of "Milk smart link" version 0.3.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
81 characters long description:
Milk smart link for WordPress, a simple redirect system based on operating system

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 detected206 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP46326200
Markdown1405
CSS1001

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.34
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%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/milk.png16.66KB8.28KB▼ 50.28%
img/milk-icon.png0.63KB0.52KB▼ 17.08%