72% link-exchange-lite

Code Review | Link Exchange Lite

WordPress plugin Link Exchange Lite scored72%from 54 tests.

About plugin

  • Plugin page: link-exchange-lite
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jul 25, 2013
  • Latest release: Jul 26, 2013
  • Number of updates: 3
  • Update frequency: every 0.7 days
  • Top authors: stesvis (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,145 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 gracefully, with no errors

Server metrics [RAM: ▼0.56MB] [CPU: ▼15.14ms] Passed 4 tests

An overview of server-side resources used by Link Exchange Lite
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1340.92 ▲1.94
Dashboard /wp-admin3.44 ▲0.1348.81 ▼1.83
Posts /wp-admin/edit.php3.49 ▲0.1348.13 ▲4.31
Add New Post /wp-admin/post-new.php3.28 ▼2.6134.05 ▼64.96
Media Library /wp-admin/upload.php3.36 ▲0.1339.40 ▲5.95
All Links /wp-admin/edit.php?post_type=link_exchange3.4035.36
Settings /wp-admin/edit.php?post_type=link_exchange&page=link_exchange_settings3.3330.42
Help /wp-admin/edit.php?post_type=link_exchange&page=link_exchange_help3.3330.20
Add New /wp-admin/post-new.php?post_type=link_exchange3.2231.38

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Link Exchange Lite
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,852 ▲10613.15 ▼1.441.67 ▼0.0943.46 ▼3.83
Dashboard /wp-admin2,252 ▲645.89 ▼0.01114.78 ▲13.1577.33 ▲35.84
Posts /wp-admin/edit.php2,138 ▲492.00 ▲0.0036.15 ▼0.1931.36 ▼2.25
Add New Post /wp-admin/post-new.php1,705 ▲17222.52 ▼0.64724.11 ▲110.5663.85 ▲12.87
Media Library /wp-admin/upload.php1,428 ▲434.23 ▼0.12102.38 ▲1.2572.08 ▲29.64
All Links /wp-admin/edit.php?post_type=link_exchange1,1041.9431.5432.65
Settings /wp-admin/edit.php?post_type=link_exchange&page=link_exchange_settings1,0142.1527.0624.92
Help /wp-admin/edit.php?post_type=link_exchange&page=link_exchange_help8632.1424.9427.85
Add New /wp-admin/post-new.php?post_type=link_exchange2,3347.65166.84141.39

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These errors were triggered by the plugin
    • > GET request to /wp-admin/post-new.php?post_type=link_exchange
    • > Notice in wp-content/plugins/link-exchange-lite/link-exchange-post-type.php+136
    Undefined index: post_type
    • > GET request to /wp-admin/post-new.php?post_type=link_exchange
    • > Notice in wp-content/plugins/link-exchange-lite/link-exchange-post-type.php+98
    Undefined variable: width
    • > GET request to /wp-admin/post-new.php?post_type=link_exchange
    • > Notice in wp-content/plugins/link-exchange-lite/link-exchange-post-type.php+98
    Undefined variable: height

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
Please fix the following
  • 7× 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/link-exchange-lite/link-exchange-help.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/link-exchange-lite/link-exchange-post-type.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/link-exchange-lite/link-exchange-settings.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/link-exchange-lite/link-exchange-shortcode-list.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/link-exchange-lite/link-exchange.php:29
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/link-exchange-lite/link-exchange-publish.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/link-exchange-lite/link-exchange-shortcode-form.php:3

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There are user-side issues you should fix
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=link_exchange
    • > Network (severe)
    wp-content/plugins/link-exchange/link-exchange.png - Failed to load resource: the server responded with a status of 404 (Not Found)

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
Attributes that require attention:
  • Requires at least: Invalid plugin version format
The official readme.txt might help

link-exchange-lite/link-exchange.php 85% from 13 tests

The main file in "Link Exchange Lite" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("link-exchange-lite.php" instead of "link-exchange.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 260 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin916 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP8181196667
PO File188216195
CSS2181850
JavaScript22164

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions30
▷ Named functions30100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
link-exchange-32.png1.36KB1.32KB▼ 3.44%
link-exchange.png0.79KB0.72KB▼ 8.97%