77% contextly-related-links

Code Review | Contextly Recommends

WordPress plugin Contextly Recommends scored77%from 54 tests.

About plugin

  • Plugin page: contextly-related...
  • Plugin version: 6.1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0.2-6.3.2
  • WordPress version: 6.3.1
  • First release: Mar 5, 2012
  • Latest release: Nov 13, 2023
  • Number of updates: 190
  • Update frequency: every 22.6 days
  • Top authors: andrewcgg (89.47%)rsingel (11.05%)

Code review

54 tests

User reviews

23 reviews

Install metrics

300+ active /47,496 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.51MB] [CPU: ▲177.84ms] Passed 4 tests

An overview of server-side resources used by Contextly Recommends
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.21 ▲0.7442.37 ▲5.51
Dashboard /wp-admin3.92 ▲0.5748.62 ▼11.29
Posts /wp-admin/edit.php4.07 ▲0.71760.38 ▲710.43
Add New Post /wp-admin/post-new.php6.03 ▲0.141,452.41 ▲1,348.91
Media Library /wp-admin/upload.php3.85 ▲0.6140.94 ▲6.72
/wp-admin/admin.php?page=contextly_overlay_dialog3.7934.21
Contextly /wp-admin/options-general.php?page=contextly_options3.8236.07

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 168 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_recent-posts
widget_theysaidso_widget
widget_contextly_siderail_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Contextly Recommends
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,835 ▲8814.79 ▲0.898.25 ▲6.4942.52 ▲4.53
Dashboard /wp-admin2,202 ▲245.47 ▼0.2684.49 ▼25.0139.85 ▼4.82
Posts /wp-admin/edit.php2,110 ▲101.98 ▼0.0436.02 ▼3.4132.06 ▼3.07
Add New Post /wp-admin/post-new.php6,433 ▲4,90430.10 ▲6.98981.06 ▲342.3237.70 ▼28.12
Media Library /wp-admin/upload.php1,410 ▲104.14 ▼0.0598.66 ▼7.3342.18 ▲0.25
/wp-admin/admin.php?page=contextly_overlay_dialog6701.127.0513.93
Contextly /wp-admin/options-general.php?page=contextly_options8002.0428.5228.66

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_contextly_siderail_widget
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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 take a closer look at the following
  • 3× PHP files output text when accessed directly:
    • > /wp-content/plugins/contextly-related-links/kit/server/templates/inline-scripts.tpl.php
    • > /wp-content/plugins/contextly-related-links/views/launch-script.php
    • > /wp-content/plugins/contextly-related-links/kit/server/templates/js-exported.tpl.php
  • 48× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Notice
      Undefined variable: vars in wp-content/plugins/contextly-related-links/views/launch-script.php on line 2
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/contextly-related-links/views/launch-script.php on line 5
    • > PHP Fatal error
      Uncaught Error: Class 'ContextlyKitBase' not found in wp-content/plugins/contextly-related-links/kit/server/includes/package/AssetsAggregator.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\Console\\Command\\Command' not found in wp-content/plugins/contextly-related-links/kit/server/includes/package/ConsoleCommand.php:9
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/contextly-related-links/views/removal-script.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'ContextlyKitAssetsConfigBase' not found in wp-content/plugins/contextly-related-links/kit/server/includes/assets/ConfigAggregated.php:3
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/contextly-related-links/views/launch-script.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'ContextlyKitBase' not found in wp-content/plugins/contextly-related-links/kit/server/includes/assets/Renderer.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'ContextlyKitBase' not found in wp-content/plugins/contextly-related-links/kit/server/includes/assets/Manager.php:3
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/contextly-related-links/kit/server/templates/js-exported.tpl.php on line 2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (Here's how the Contextly main module looks underneath a post.), #2 (This is what the Siderail looks like.), #3 (Here's an in-story sidebar created in seconds.), #4 (Here's what the interface for choosing related posts looks like.), #5 (Here's what the related posts preview looks like inside the post editor.), #6 (Here's a snippet of what the analytics e-mails look like.)
  • Tags: Please delete some tags, you are using 21 tag instead of maximum 10
You can take inspiration from this readme.txt

contextly-related-links/contextly-linker.php 85% from 13 tests

This is the main PHP file of "Contextly Recommends" version 6.1.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Description: Please don't use more than 140 characters for the plugin description (currently 256 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("contextly-related-links.php" instead of "contextly-linker.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected6,803 lines of code in 157 files:
LanguageFilesBlank linesComment linesLines of code
PHP401,1511,7494,406
JavaScript6193921,180
JSON108550892
Markdown31150325

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity9.91
▷ Minimum class complexity1.00
▷ Maximum class complexity141.00
Average method complexity2.23
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces3
Traits0
Classes50
▷ Abstract classes36.00%
▷ Concrete classes4794.00%
▷ Final classes00.00%
Methods398
▷ Static methods215.28%
▷ Public methods31579.15%
▷ Protected methods6115.33%
▷ Private methods225.53%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants70
▷ Global constants1014.29%
▷ Class constants6085.71%
▷ Public constants60100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
8 PNG files occupy 0.89MB with 0.53MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-5.png73.37KB27.27KB▼ 62.84%
screenshot-4.png187.89KB82.63KB▼ 56.02%
screenshot-1.png181.21KB55.87KB▼ 69.17%
js/img/contextly-link.png0.42KB0.22KB▼ 47.53%
screenshot-2.png176.24KB63.59KB▼ 63.92%