10% linkvertise-script-api

Code Review | Linkvertise Script API

WordPress plugin Linkvertise Script API scored 10% from 54 tests.

About plugin

  • Plugin page: linkvertise-scrip...
  • Plugin version: 1.0.8
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1.1-5.4
  • WordPress version: 6.3.1
  • First release: May 4, 2019
  • Latest release: Apr 13, 2020
  • Number of updates: 22
  • Update frequency: every 15.9 days
  • Top authors: linkvertise (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active / 6,173 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
It is recommended to fix the following installer errors
  • The plugin did not install without errors
    • > Warning in wp-content/plugins/linkvertise-script-api/inc/Base/Activate.php+16
    copy(/wp-content/languages/plugins/linkvertise-script-api-de_DE.mo): failed to open stream: No such file or directory

Server metrics [RAM: ▲0.04MB] [CPU: ▲0.33ms] Passed 4 tests

This is a short check of server-side resources used by Linkvertise Script API
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0438.92 ▼4.33
Dashboard /wp-admin3.34 ▲0.0445.63 ▼0.92
Posts /wp-admin/edit.php3.46 ▲0.1050.24 ▲5.84
Add New Post /wp-admin/post-new.php5.94 ▲0.0696.44 ▲4.51
Media Library /wp-admin/upload.php3.27 ▲0.0435.98 ▲2.06
Settings /wp-admin/admin.php?page=linkvertise_script_api3.2631.74
Help /wp-admin/admin.php?page=linkvertise_script_api_help3.2832.25

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 35 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
widget_recent-posts
can_compress_scripts
linkvertise_script_api_settings

Browser metrics Passed 4 tests

Checking browser requirements for Linkvertise Script API
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲9914.79 ▲0.211.70 ▼0.0443.71 ▲0.36
Dashboard /wp-admin2,237 ▲525.81 ▲0.9299.29 ▼9.3139.42 ▼3.05
Posts /wp-admin/edit.php2,123 ▲342.02 ▲0.0140.05 ▲5.8835.83 ▲3.92
Add New Post /wp-admin/post-new.php1,557 ▲2423.20 ▲0.04600.11 ▼99.0749.21 ▼13.93
Media Library /wp-admin/upload.php1,422 ▲314.19 ▼0.0093.62 ▼1.9242.20 ▼1.83
Settings /wp-admin/admin.php?page=linkvertise_script_api8751.7024.3738.56
Help /wp-admin/admin.php?page=linkvertise_script_api_help1,2966.2647.7660.72

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/linkvertise-script-api/linkvertise-script-api.php+54
    Non-static method Inc\Base\Deactivate::deactivatePlugin() should not be called statically
  • Zombie WordPress options were found after uninstall: 7 options
    • linkvertise_script_api_settings
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% 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)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 7× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'Inc\\Base\\BaseController' not found in wp-content/plugins/linkvertise-script-api/inc/Base/SettingsLinks.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_errors() in wp-content/plugins/linkvertise-script-api/templates/admin.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Inc\\Base\\BaseController' not found in wp-content/plugins/linkvertise-script-api/inc/Pages/Admin.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/linkvertise-script-api/templates/help.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/linkvertise-script-api/templates/adminMainSec.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Inc\\Base\\BaseController' not found in wp-content/plugins/linkvertise-script-api/inc/Api/Callbacks/AdminCallbacks.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Inc\\Base\\BaseController' not found in wp-content/plugins/linkvertise-script-api/inc/Base/Enqueue.php:10

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 90% from 29 tests

readme.txt 81% 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
Please fix the following attributes:
  • Screenshots: No descriptions were found for these screenshots #1, #2, #3, #4 in linkvertise-script-api/assets to your readme.txt
  • Requires php: The plugin version is formatted incorrectly
  • Donate link: Please fix this invalid url: ""
The official readme.txt is a good inspiration

linkvertise-script-api/linkvertise-script-api.php Passed 13 tests

The main PHP script in "Linkvertise Script API" version 1.0.8 is automatically included on every request by WordPress
71 characters long description:
This plugin includes the Linkvertise API script to your Wordpress page.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin1,270 lines of code in 31 files:
LanguageFilesBlank linesComment linesLines of code
PHP262283031,043
PO File13936110
CSS117281
JSON20020
JavaScript10016

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.41
Average class complexity8.56
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.75
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces7
Interfaces0
Traits0
Classes16
▷ Abstract classes00.00%
▷ Concrete classes16100.00%
▷ Final classes16.25%
Methods70
▷ Static methods811.43%
▷ Public methods6795.71%
▷ Protected methods00.00%
▷ Private methods34.29%
Functions5
▷ Named functions480.00%
▷ Anonymous functions120.00%
Constants0
▷ Global constants00.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
PNG images were not found in this plugin