83% minhnhut-link-gateway

Code Review | MinhNhut Link Gateway

WordPress plugin MinhNhut Link Gateway scored83%from 54 tests.

About plugin

  • Plugin page: minhnhut-link-gat...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.6
  • WordPress version: 6.3.1
  • First release: Jan 15, 2014
  • Latest release: Feb 20, 2014
  • Number of updates: 8
  • Update frequency: every 4.6 days
  • Top authors: minhnhut (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /749 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼2.78ms] Passed 4 tests

This is a short check of server-side resources used by MinhNhut Link Gateway
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.07 ▼6.48
Dashboard /wp-admin3.32 ▲0.0245.50 ▼4.59
Posts /wp-admin/edit.php3.37 ▲0.0245.86 ▼2.36
Add New Post /wp-admin/post-new.php5.90 ▲0.0290.36 ▲3.79
Media Library /wp-admin/upload.php3.25 ▲0.0234.94 ▲2.33
Link Gate Redirector /wp-admin/options-general.php?page=linkgate3.2132.86

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, 14 new options
New WordPress options
mn_linkgate_page_go
mn_linkgate_page_description
mn_linkgate_page_created
mn_linkgate_page_delay
mn_linkgate_page_slug
widget_theysaidso_widget
can_compress_scripts
mn_linkgate_page_back
db_upgraded
theysaidso_admin_options
...

Browser metrics Passed 4 tests

Checking browser requirements for MinhNhut Link Gateway
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.30 ▼1.091.66 ▼0.3341.20 ▼1.70
Dashboard /wp-admin2,213 ▲254.88 ▼1.0399.37 ▼14.5639.83 ▼5.25
Posts /wp-admin/edit.php2,093 ▲42.02 ▼0.0239.62 ▲3.5335.94 ▲0.47
Add New Post /wp-admin/post-new.php1,536 ▲123.26 ▲0.06614.02 ▼62.8648.38 ▼12.87
Media Library /wp-admin/upload.php1,395 ▲134.24 ▼0.0297.64 ▼3.0240.73 ▼2.81
Link Gate Redirector /wp-admin/options-general.php?page=linkgate9552.0324.6033.69

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin does not fully uninstall, leaving 14 options in the database
    • db_upgraded
    • mn_linkgate_page_go
    • theysaidso_admin_options
    • mn_linkgate_page_title
    • mn_linkgate_page_description
    • widget_recent-comments
    • mn_linkgate_page_created
    • mn_linkgate_page_back
    • mn_linkgate_back_url
    • widget_recent-posts
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% 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
The following issues need your attention
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/minhnhut-link-gateway/classes.php:20
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/minhnhut-link-gateway/templates/default/index.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 90% 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 (The screenshot description corresponds to screenshot-1.(png|jpg|jpeg|gif).), #2 (The screenshot description corresponds to screenshot-2.(png|jpg|jpeg|gif).), #3 (The screenshot description corresponds to screenshot-3.(png|jpg|jpeg|gif).)
Please take inspiration from this readme.txt

minhnhut-link-gateway/linkgate.php 85% from 13 tests

The main file in "MinhNhut Link Gateway" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Description: Keep the plugin description shorter than 140 characters (currently 194 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("minhnhut-link-gateway.php" instead of "linkgate.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected247 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP35047239
CSS1158

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.10
Average class complexity6.00
▷ Minimum class complexity4.00
▷ Maximum class complexity8.00
Average method complexity1.71
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods1285.71%
▷ Protected methods214.29%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.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
There were not PNG files found in your plugin