83% ng-secret-link

Code Review | NG Secret link

WordPress plugin NG Secret link scored83%from 54 tests.

About plugin

  • Plugin page: ng-secret-link
  • Plugin version: 1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-5.3.2
  • WordPress version: 6.3.1
  • First release: Feb 27, 2020
  • Latest release: Mar 3, 2020
  • Number of updates: 3
  • Update frequency: every 1.7 days
  • Top authors: nikitaglobal (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /386 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.06MB] [CPU: ▲2.62ms] Passed 4 tests

A check of server-side resources used by NG Secret link
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0544.32 ▲4.12
Dashboard /wp-admin3.37 ▲0.0654.32 ▼0.21
Posts /wp-admin/edit.php3.42 ▲0.0751.89 ▲6.55
Add New Post /wp-admin/post-new.php5.95 ▲0.0687.70 ▲0.08
Media Library /wp-admin/upload.php3.30 ▲0.0739.94 ▲6.47
NG Secret link /wp-admin/options-general.php?page=NGSecretLink3.2631.39

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by NG Secret link
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.61 ▼1.044.44 ▲2.7543.92 ▲4.63
Dashboard /wp-admin2,210 ▲225.84 ▲0.9699.48 ▼9.2738.55 ▲2.20
Posts /wp-admin/edit.php2,093 ▲72.04 ▲0.0334.74 ▼0.7330.14 ▼2.76
Add New Post /wp-admin/post-new.php1,536 ▲1623.20 ▲0.10652.86 ▼9.4355.88 ▼0.86
Media Library /wp-admin/upload.php1,392 ▲74.22 ▲0.0398.36 ▲2.6741.17 ▼0.35
NG Secret link /wp-admin/options-general.php?page=NGSecretLink8102.0323.1225.28

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
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options

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)
Everything seems fine, however 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
Please fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/ng-secret-link/ng-secret-link.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
2 plugin tags: privacy, security

ng-secret-link/ng-secret-link.php 77% from 13 tests

The primary PHP file in "NG Secret link" version 1.0 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes
  • Domain Path: The domain path should use only dashes and lowercase characters ("languages")
  • Domain Path: Prefix the domain path with a forward slash character ("/languages")

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
Success! There were no dangerous files found in this plugin319 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP126135310
JavaScript1008
HTML1001

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity36.00
▷ Minimum class complexity36.00
▷ Maximum class complexity36.00
Average method complexity2.94
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods18
▷ Static methods211.11%
▷ Public methods1372.22%
▷ Protected methods00.00%
▷ Private methods527.78%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin