10% factlink

Code Review | Factlink for Wordpress

WordPress plugin Factlink for Wordpress scored 10% from 53 tests.

About plugin

  • Plugin page: factlink
  • Plugin version: 2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1.0-3.9
  • WordPress version: 5.8.1
  • First release: Nov 14, 2013
  • Latest release: Apr 17, 2014
  • Number of updates: 20
  • Update frequency: every 7.7 days
  • Top authors: factlink (100%)

Code review

53 tests

User reviews

1 review

Install metrics

10+ active / 1,542 total downloads

Benchmarks

Plugin footprint 75% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The following installer errors require your attention
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/factlink/lib/util/util.php+17
    Function create_function() is deprecated

Server metrics [RAM: ▼0.00MB] [CPU: ▼258.56ms] Passed 4 tests

This is a short check of server-side resources used by Factlink for Wordpress
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.83 ▲0.1134.82 ▲13.89
Dashboard /wp-admin3.06 ▲0.0041.81 ▲1.94
Posts /wp-admin/edit.php3.11 ▲0.0041.31 ▲2.71
Add New Post /wp-admin/post-new.php5.42 ▼0.0190.33 ▼1,034.23
Media Library /wp-admin/upload.php3.00 ▼0.0134.38 ▼4.66

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 21 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Factlink for Wordpress
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,674 ▲6816.25 ▲0.579.10 ▲0.8747.04 ▼1.99
Dashboard /wp-admin2,928 ▲785.95 ▲0.09137.07 ▲2.18103.77 ▼6.92
Posts /wp-admin/edit.php2,706 ▼02.70 ▲0.0164.83 ▼0.4384.22 ▼3.11
Add New Post /wp-admin/post-new.php1,857 ▲20019.16 ▲0.26365.37 ▲10.67105.08 ▼3.75
Media Library /wp-admin/upload.php1,775 ▲35.01 ▼0.00154.64 ▲1.40108.30 ▼6.66

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Uninstall script ran successfully

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 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/factlink/factlink.php
    • > /wp-content/plugins/factlink/app/view/include_factlink.php
  • 12× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'vg\\wordpress_plugin\\capability\\Capability' not found in wp-content/plugins/factlink/app/capability/disable_comments.php:5
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/factlink/app/view/meta_box.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'vg\\wordpress_plugin\\capability\\Capability' not found in wp-content/plugins/factlink/app/capability/meta_box.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'vg\\wordpress_plugin\\capability\\Capability' not found in wp-content/plugins/factlink/app/capability/include_factlink.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/factlink/app/view/admin_page.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'vg\\wordpress_plugin\\capability\\Capability' not found in wp-content/plugins/factlink/app/capability/admin_page.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'vg\\wordpress_plugin\\capability\\Capability' not found in wp-content/plugins/factlink/app/capability/configuration_notice.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'vg\\wordpress_plugin\\model\\meta\\Meta' not found in wp-content/plugins/factlink/lib/model/meta/option.php:5
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/factlink/app/view/configuration_notice.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'vg\\wordpress_plugin\\model\\Model' not found in wp-content/plugins/factlink/app/model/settings.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === factlink === )
Please take inspiration from this readme.txt

factlink/factlink.php Passed 13 tests

The primary PHP file in "Factlink for Wordpress" version 2.1 is used by WordPress to initiate all plugin functionality
78 characters long description:
Integrates the Factlink commenting & annotation tool in your Wordpress website

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
No dangerous file extensions were detected715 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP20227138715

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity4.81
▷ Minimum class complexity1.00
▷ Maximum class complexity19.00
Average method complexity1.97
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces7
Interfaces0
Traits0
Classes16
▷ Abstract classes00.00%
▷ Concrete classes16100.00%
▷ Final classes00.00%
Methods59
▷ Static methods23.39%
▷ Public methods4271.19%
▷ Protected methods1118.64%
▷ Private methods610.17%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 1 test

Image compression Passed 1 test

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected