77% adapti-link

Code Review | Personalize Content

WordPress plugin Personalize Content scored 77% from 54 tests.

About plugin

  • Plugin page: adapti-link
  • Plugin version: 2.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.8
  • WordPress version: 5.9.2
  • First release: Apr 11, 2017
  • Latest release: Jul 20, 2018
  • Number of updates: 19
  • Update frequency: every 24.5 days
  • Top authors: adapti (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 772 total downloads


Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▼1.15MB] [CPU: ▲1,315.57ms] 75% from 4 tests

A check of server-side resources used by Personalize Content
It is recommended to improve the following
  • Extra CPU: The extra CPU usage must be under 200.00ms (currently 1,315.57ms on /wp-admin/upload.php)
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1469.85 ▲1.99
Dashboard /wp-admin3.18 ▼0.232,237.68 ▲2,200.73
Posts /wp-admin/edit.php3.18 ▼0.462,296.27 ▲2,250.91
Add New Post /wp-admin/post-new.php3.18 ▼3.792,224.73 ▲870.77
Media Library /wp-admin/upload.php3.18 ▼0.112,211.69 ▲2,188.80

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 43 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Personalize Content
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,955 ▲21316.06 ▲0.879.43 ▲3.392.50 ▲0.04
Dashboard /wp-admin2,940 ▲876.14 ▼0.04118.77 ▼8.41175.84 ▲11.21
Posts /wp-admin/edit.php2,737 ▲463.23 ▲0.0063.23 ▼1.15145.16 ▼4.16
Add New Post /wp-admin/post-new.php1,751 ▲9017.44 ▲0.75447.14 ▲18.11184.93 ▲9.02
Media Library /wp-admin/upload.php1,742 ▲445.56 ▼0.03162.57 ▲17.72226.74 ▼206.98

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/adapti-link/admin/core/Api.php+42
    Undefined index: adapti_link

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/adapti-link/public/partials/api_script.php
    • > /wp-content/plugins/adapti-link/admin/partials/pages_list/version-component.php
  • 21× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function adapti_remove_js() in wp-content/plugins/adapti-link/admin/partials/admin-tab/credits.php:9
    • > PHP Notice
      Undefined variable: versions in wp-content/plugins/adapti-link/admin/partials/metabox/versions.php on line 14
    • > PHP Fatal error
      Uncaught Error: Class 'Adapti_Api' not found in wp-content/plugins/adapti-link/admin/partials/admin-menu.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/adapti-link/admin/partials/init_js.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/adapti-link/admin/partials/admin-tab/adaptation-component.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/adapti-link/admin/partials/admin-tab/adaptations.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/adapti-link/admin/partials/metabox/versions.php:42
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/adapti-link/admin/partials/wp-alert.php:2
    • > PHP Notice
      Undefined variable: api_script in wp-content/plugins/adapti-link/public/partials/api_script.php on line 1
    • > PHP Notice
      Undefined variable: strOperators in wp-content/plugins/adapti-link/admin/partials/metabox/versions.php on line 8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found


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
These attributes need your attention:
  • Donate link: Please fix this invalid url: ""
  • Screenshots: Add descriptions for screenshots #1, #2, #3, #4 in adapti-link/assets to your readme.txt
The official readme.txt is a good inspiration

adapti-link/adapti-link.php Passed 13 tests

The main file in "Personalize Content" v. 2.0.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
69 characters long description:
Manage your website to properly use adapti.me web adaptation service.

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
Good job! No executable or dangerous file extensions detected2,028 lines of code in 34 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity9.08
▷ Minimum class complexity1.00
▷ Maximum class complexity34.00
Average method complexity2.18
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes00.00%
▷ Static methods1822.50%
▷ Public methods6885.00%
▷ Protected methods00.00%
▷ Private methods1215.00%
▷ Named functions777.78%
▷ Anonymous functions222.22%
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.24MB with 0.20MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
(invalid) admin/img/head_bg2.png72.92KB0.00KB▼ 100.00%
admin/img/head_bg.png159.62KB83.82KB▼ 47.48%
admin/img/clock.png17.76KB0.25KB▼ 98.62%