10% jd-link-exchange

Code Review | Plugin name: JD Link Exchange

WordPress plugin Plugin name: JD Link Exchangescored10%from 54 tests.

About plugin

  • Plugin page: jd-link-exchange
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.4
  • WordPress version: 6.3.1
  • First release: Dec 16, 2015
  • Latest release: Dec 18, 2015
  • Number of updates: 5
  • Update frequency: every 0.6 days
  • Top authors: jooky (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,765 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
These installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Warning in wp-content/plugins/jd-link-exchange/jd-link-exchange.php+29
    Use of undefined constant AH_CONTENT - assumed 'AH_CONTENT' (this will throw an Error in a future version of PHP)

Server metrics [RAM: ▼1.96MB] [CPU: ▼51.46ms] Passed 4 tests

A check of server-side resources used by Plugin name: JD Link Exchange
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.434.34 ▼35.02
Dashboard /wp-admin2.05 ▼1.265.36 ▼41.54
Posts /wp-admin/edit.php2.05 ▼1.315.95 ▼39.19
Add New Post /wp-admin/post-new.php2.05 ▼3.845.56 ▼90.08
Media Library /wp-admin/upload.php2.05 ▼1.184.78 ▼32.01

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 17 new files
Database: no new tables, 7 new options
New WordPress options
widget_jdl_widget_class
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Plugin name: JD Link Exchange
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲8014.78 ▲0.411.76 ▲0.1342.64 ▲0.47
Dashboard /wp-admin2,221 ▲334.90 ▼1.0098.60 ▼8.0575.55 ▲33.36
Posts /wp-admin/edit.php2,104 ▲121.99 ▲0.0338.74 ▼0.0235.16 ▲1.72
Add New Post /wp-admin/post-new.php1,545 ▲1218.06 ▼5.12682.76 ▲18.3178.59 ▲22.32
Media Library /wp-admin/upload.php1,403 ▲184.22 ▲0.02117.72 ▲11.7346.62 ▼0.32

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin cannot be uninstalled
    • > Warning in wp-content/plugins/jd-link-exchange/jd-link-exchange.php+29
    Use of undefined constant AH_CONTENT - assumed 'AH_CONTENT' (this will throw an Error in a future version of PHP)
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_jdl_widget_class
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 50% 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 0% 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
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/jd-link-exchange/include/fonction_jdlink.php
  • 12× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHWPINC/rss.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/jd-link-exchange/include/fonction_jdlink.php on line 2
    • > PHP Warning
      include(ABSPATHwp-includes/pluggable.php): failed to open stream: No such file or directory in wp-content/plugins/jd-link-exchange/jd-link-exchange.php on line 10
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/jd-link-exchange/jd-link-exchange.php on line 10
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/jd-link-exchange/widget.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_get_current_user() in wp-content/plugins/jd-link-exchange/index.php:10
    • > PHP Warning
      include_once(ABSPATHWPINC/rss.php): failed to open stream: No such file or directory in wp-content/plugins/jd-link-exchange/include/fonction_jdlink.php on line 2
    • > PHP Warning
      Use of undefined constant WPINC - assumed 'WPINC' (this will throw an Error in a future version of PHP) in wp-content/plugins/jd-link-exchange/include/fonction_jdlink.php on line 2
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATH/wp-admin/includes/plugin.php' (include_path='.:/usr/share/php') in wp-content/plugins/jd-link-exchange/jd-link-exchange.php on line 14
    • > PHP Warning
      require_once(ABSPATH/wp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/jd-link-exchange/jd-link-exchange.php on line 14
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/jd-link-exchange/jd-link-exchange.php on line 14

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === Plugin name: JD Link Exchange=== )
  • Tags: You are using too many tags: 18 tag instead of maximum 10
Please take inspiration from this readme.txt

jd-link-exchange/jd-link-exchange.php Passed 13 tests

Analyzing the main PHP file in "Plugin name: JD Link Exchange" version 1.3
83 characters long description:
Links Exchange automatic SEO - € 10 offered links to the activation of the widget

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 detected451 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP410218451

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity7.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%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
11 PNG files occupy 1.22MB with 1.09MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-128x128.png121.31KB10.13KB▼ 91.65%
assets/icon-32x32.png38.47KB1.90KB▼ 95.07%
assets/screenshot-2.png45.06KB3.93KB▼ 91.28%
assets/icon-96x96.png83.86KB6.54KB▼ 92.20%
img/Ball-stop.png156.12KB40.46KB▼ 74.08%