84% open-link

Code Review | Open Link 图链

WordPress plugin Open Link 图链 scored84%from 54 tests.

About plugin

  • Plugin page: open-link
  • Plugin version: 2.1
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Dec 2, 2013
  • Latest release: Nov 16, 2019
  • Number of updates: 27
  • Update frequency: every 80.6 days
  • Top authors: playes (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /4,053 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

This is a short check of server-side resources used by Open Link 图链
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.70 ▼3.75
Dashboard /wp-admin3.32 ▲0.0151.25 ▼3.29
Posts /wp-admin/edit.php3.37 ▲0.0154.96 ▼4.09
Add New Post /wp-admin/post-new.php5.90 ▲0.01119.92 ▲20.17
Media Library /wp-admin/upload.php3.24 ▲0.0139.75 ▲3.12
Open Link /wp-admin/options-general.php?page=open-link3.2133.17

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Open Link 图链: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.28 ▲0.111.59 ▼0.1040.81 ▼6.75
Dashboard /wp-admin2,202 ▲225.65 ▲0.0190.74 ▼0.9839.44 ▼5.69
Posts /wp-admin/edit.php2,104 ▲42.05 ▲0.0040.62 ▲3.1336.40 ▲2.00
Add New Post /wp-admin/post-new.php1,548 ▲323.14 ▼0.02664.12 ▼66.0549.87 ▼4.70
Media Library /wp-admin/upload.php1,401 ▼24.26 ▲0.0596.32 ▼27.3046.08 ▼12.59
Open Link /wp-admin/options-general.php?page=open-link9752.0524.6129.35

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 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 50% 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 take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/open-link/open-link.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were 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
Attributes that require attention:
  • Screenshots: These screenshots do not have images: #1 (links), #2 (setting)
You can take inspiration from this readme.txt

open-link/open-link.php 92% from 13 tests

"Open Link 图链" version 2.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Description: The description should be shorter than 140 characters (currently 171 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected382 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP11210241
PO File24652141

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.41
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%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
2 PNG files occupy 0.20MB with 0.13MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png120.37KB43.47KB▼ 63.88%
screenshot-2.png89.15KB30.16KB▼ 66.16%