84% text-widget-as-link

Code Review | Text Widget As Link

WordPress plugin Text Widget As Link scored84%from 54 tests.

About plugin

  • Plugin page: text-widget-as-link
  • Plugin version: 1.4.9
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.9.8
  • WordPress version: 6.3.1
  • First release: Sep 8, 2014
  • Latest release: Aug 10, 2018
  • Number of updates: 5
  • Update frequency: every 286.8 days
  • Top authors: leanderlindahl (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /2,012 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

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

A check of server-side resources used by Text Widget As Link
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0134.84 ▼0.78
Dashboard /wp-admin3.31 ▲0.0143.97 ▼3.06
Posts /wp-admin/edit.php3.36 ▲0.0147.81 ▼3.87
Add New Post /wp-admin/post-new.php5.89 ▲0.0182.54 ▼18.44
Media Library /wp-admin/upload.php3.24 ▲0.0136.35 ▲4.86

Server storage [IO: ▲0.01MB] [DB: ▲0.07MB] Passed 3 tests

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

Browser metrics Passed 4 tests

Checking browser requirements for Text Widget As Link
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.22 ▼1.161.69 ▼0.1937.28 ▼2.23
Dashboard /wp-admin2,209 ▲175.79 ▲0.8294.51 ▼11.3240.06 ▼6.44
Posts /wp-admin/edit.php2,092 ▲32.05 ▲0.0340.53 ▲0.5537.24 ▲1.09
Add New Post /wp-admin/post-new.php1,514 ▼2817.62 ▼0.72652.08 ▲41.3960.26 ▲7.14
Media Library /wp-admin/upload.php1,388 ▲64.17 ▼0.0798.84 ▼0.5841.23 ▼0.37

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_text_widget_as_link
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking 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
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/text-widget-as-link/text-widget-as-link.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
1 plugin tags: text widget

text-widget-as-link/text-widget-as-link.php Passed 13 tests

The main PHP file in "Text Widget As Link" ver. 1.4.9 adds more information about the plugin and also serves as the entry point for this plugin
40 characters long description:
Link the entire widget to a specific URL

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
Success! There were no dangerous files found in this plugin73 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1165673

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity2.75
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.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
No PNG files were detected