68% adapti-link

Code Review | Personalize Content

WordPress plugin Personalize Content scored 68% 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: 6.3.1
  • 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 / 951 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▼0.86MB] [CPU: ▲34.56ms] Passed 4 tests

This is a short check of server-side resources used by Personalize Content
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1048.21 ▲9.34
Dashboard /wp-admin3.08 ▼0.22105.06 ▲60.94
Posts /wp-admin/edit.php3.08 ▼0.28100.51 ▲54.18
Add New Post /wp-admin/post-new.php3.08 ▼2.81110.93 ▲13.77
Media Library /wp-admin/upload.php3.08 ▼0.15109.02 ▲63.06

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 43 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Personalize Content
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,947 ▲21213.69 ▼0.615.88 ▲4.0447.96 ▲5.13
Dashboard /wp-admin2,230 ▲454.94 ▼0.96112.45 ▲1.0575.55 ▲32.05
Posts /wp-admin/edit.php2,126 ▲372.01 ▼0.0534.40 ▼6.7533.45 ▼2.91
Add New Post /wp-admin/post-new.php1,722 ▲19423.54 ▲5.00585.01 ▼21.1962.81 ▲3.38
Media Library /wp-admin/upload.php1,418 ▲304.23 ▲0.03114.27 ▲8.6583.38 ▲36.06

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
The following items require your attention
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/adapti-link/admin/core/Api.php+42
    Undefined index: adapti_link
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
Please fix the following items
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/adapti-link/admin/partials/pages_list/version-component.php
    • > /wp-content/plugins/adapti-link/public/partials/api_script.php
  • 21× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > 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 Warning
      count(): Parameter must be an array or an object that implements Countable in wp-content/plugins/adapti-link/admin/partials/pages_list/version-component.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/adapti-link/admin/partials/wp-alert.php:2
    • > 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 get_option() in wp-content/plugins/adapti-link/admin/partials/admin-tab/adaptation-list.php:4
    • > PHP Notice
      Undefined variable: versions in wp-content/plugins/adapti-link/admin/partials/metabox/versions.php on line 14
    • > 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: 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 get_option() in wp-content/plugins/adapti-link/admin/partials/admin-display.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% 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
These attributes need your attention:
  • Donate link: Please fix this invalid url: ""
  • Screenshots: These screenshots need descriptions #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

This is the main PHP file of "Personalize Content" version 2.0.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
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 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin2,028 lines of code in 34 files:
LanguageFilesBlank linesComment linesLines of code
PHP303955971,273
CSS28211605
JavaScript21842150

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
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
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes00.00%
Methods80
▷ Static methods1822.50%
▷ Public methods6885.00%
▷ Protected methods00.00%
▷ Private methods1215.00%
Functions9
▷ Named functions777.78%
▷ Anonymous functions222.22%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
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
admin/img/head_bg.png159.62KB83.82KB▼ 47.48%
(invalid) admin/img/head_bg2.png72.92KB0.00KB▼ 100.00%
admin/img/clock.png17.76KB0.25KB▼ 98.62%