10% wp-applink

Code Review | WP Applink

WordPress plugin WP Applink scored10%from 54 tests.

About plugin

  • Plugin page: wp-applink
  • Plugin version: 0.4.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.9.1
  • WordPress version: 6.3.1
  • First release: Feb 8, 2017
  • Latest release: Feb 20, 2022
  • Number of updates: 21
  • Update frequency: every 87.5 days
  • Top authors: ejointjp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /2,050 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
You still need to fix the following installer errors
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/wp-applink/class/class-itunes.php+47
    Trying to access array offset on value of type bool

Server metrics [RAM: ▼1.79MB] [CPU: ▼49.87ms] Passed 4 tests

This is a short check of server-side resources used by WP Applink
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.20 ▼1.276.01 ▼39.14
Dashboard /wp-admin2.22 ▼1.096.04 ▼40.81
Posts /wp-admin/edit.php2.22 ▼1.147.37 ▼37.77
Add New Post /wp-admin/post-new.php2.22 ▼3.677.39 ▼81.77
Media Library /wp-admin/upload.php2.22 ▼1.017.21 ▼32.17
WP Applink /wp-admin/options-general.php?page=wpal-setting2.228.18

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

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

Browser metrics Passed 4 tests

A check of browser resources used by WP Applink
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,813 ▲6713.68 ▼0.881.76 ▲0.0343.83 ▼2.21
Dashboard /wp-admin2,220 ▲294.91 ▼1.00109.70 ▲0.3739.81 ▼3.46
Posts /wp-admin/edit.php2,103 ▲142.06 ▼0.0840.37 ▼0.9834.87 ▲0.33
Add New Post /wp-admin/post-new.php6,418 ▲4,88818.88 ▼4.20907.23 ▲265.9064.57 ▲14.90
Media Library /wp-admin/upload.php1,402 ▲144.25 ▲0.0299.15 ▼7.0241.35 ▼1.53
WP Applink /wp-admin/options-general.php?page=wpal-setting9022.0726.2429.44

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/wp-applink/class/class-itunes.php+47
    Undefined index: country
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=wpal-setting
    • > Notice in wp-content/plugins/wp-applink/class/class-itunes.php+47
    Undefined index: country

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
Please take a closer look at the following
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wp-applink/views/view-metabox.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wp-applink/wp-applink.php:33

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/options-general.php?page=wpal-setting
    • > Javascript (severe) in unknown
    /wp-content/plugins/wp-applink/assets/js/bundle.js?ver=0.4.1 0:2428 Uncaught TypeError: Cannot read properties of null (reading 'value')

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Donate link: Please fix this invalid url: ""
You can take inspiration from this readme.txt

wp-applink/wp-applink.php Passed 13 tests

The main file in "WP Applink" v. 0.4.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
120 characters long description:
It is a WordPress plugin that generates iTunes PHG affiliate links such as iPhone, iPad, Mac apps and music, movies etc.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected1,065 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP616472792
Stylus2421174
PO File1436096
CSS2002
JavaScript1001

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity21.50
▷ Minimum class complexity4.00
▷ Maximum class complexity52.00
Average method complexity2.12
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes125.00%
▷ Concrete classes375.00%
▷ Final classes00.00%
Methods74
▷ Static methods11.35%
▷ Public methods4864.86%
▷ Protected methods2128.38%
▷ Private methods56.76%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants250.00%
▷ Class constants250.00%
▷ Public constants2100.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
No PNG images were found in this plugin