10% anylink

Code Review | anyLink

WordPress plugin anyLink scored10%from 54 tests.

About plugin

  • Plugin page: anylink
  • Plugin version: 0.3.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-4.5.2
  • WordPress version: 6.3.1
  • First release: Sep 9, 2013
  • Latest release: Jun 21, 2016
  • Number of updates: 90
  • Update frequency: every 11.3 days
  • Top authors: SivaDu (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

200+ active /10,251 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
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/anylink/classes/al_filter.php+11
    Trying to access array offset on value of type bool

Server metrics [RAM: ▲0.15MB] [CPU: ▼5.65ms] Passed 4 tests

A check of server-side resources used by anyLink
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1642.35 ▲3.24
Dashboard /wp-admin3.47 ▲0.1347.84 ▼7.62
Posts /wp-admin/edit.php3.59 ▲0.2346.37 ▲0.34
Add New Post /wp-admin/post-new.php6.05 ▲0.1780.71 ▼14.41
Media Library /wp-admin/upload.php3.39 ▲0.1734.54 ▼0.92
anylink Settings /wp-admin/options-general.php?page=anyLinkSetting3.4230.66

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 19 new files
Database: 2 new tables, 6 new options
New tables
wp_al_urls
wp_al_urls_index
New WordPress options
db_upgraded
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

anyLink: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲4714.35 ▼0.181.79 ▲0.2344.59 ▲4.23
Dashboard /wp-admin2,199 ▲185.51 ▼0.0687.17 ▼13.8538.14 ▼7.11
Posts /wp-admin/edit.php2,104 ▲12.02 ▲0.0236.72 ▼1.6031.15 ▼0.91
Add New Post /wp-admin/post-new.php6,224 ▲4,69826.01 ▲2.27808.47 ▲149.9049.33 ▼4.07
Media Library /wp-admin/upload.php1,398 ▼24.15 ▼0.0692.56 ▼3.7240.12 ▼3.26
anylink Settings /wp-admin/options-general.php?page=anyLinkSetting9282.0422.4528.24

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • The plugin did not uninstall gracefully
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.)
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 50% 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)
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/anylink/re.php
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Notice
      Undefined variable: gotoLink in wp-content/plugins/anylink/re.php on line 5
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/anylink/config.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/anylink/config.php:6
    • > PHP Notice
      Undefined variable: gotoLink in wp-content/plugins/anylink/re.php on line 10

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

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Screenshots: A description for screenshot #1 is missing in anylink/assets to your readme.txt
You can look at the official readme.txt

anylink/anyLink.php 85% from 13 tests

The principal PHP file in "anyLink" v. 0.3.1 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("anylink.php" instead of "anyLink.php")
  • Description: The description should be shorter than 140 characters (currently 254 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin1,289 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP10241911,081
PO File15961177
CSS10022
JavaScript1009

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity20.75
▷ Minimum class complexity8.00
▷ Maximum class complexity37.00
Average method complexity2.84
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods43
▷ Static methods00.00%
▷ Public methods4297.67%
▷ Protected methods00.00%
▷ Private methods12.33%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/donate_alipay.png14.51KB6.61KB▼ 54.43%