10% taboola

Code Review | Taboola

WordPress plugin Taboola scored10%from 54 tests.

About plugin

  • Plugin page: taboola
  • Plugin version: 2.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.3.2
  • WordPress version: 6.3.1
  • First release: Jun 9, 2014
  • Latest release: Nov 6, 2023
  • Number of updates: 71
  • Update frequency: every 48.5 days
  • Top authors: Michelle.l (60.56%)taboolawordpress (40.85%)

Code review

54 tests

User reviews

1 review

Install metrics

1,000+ active /35,220 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
You still need to fix the following installer errors
  • The plugin cannot be installed
    • > Warning in wp-content/plugins/taboola/taboola_widget.php+698
    mysqli_get_server_info() expects exactly 1 parameter, 0 given

Server metrics [RAM: ▲0.01MB] [CPU: ▼4.11ms] Passed 4 tests

An overview of server-side resources used by Taboola
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.21 ▼4.29
Dashboard /wp-admin3.32 ▲0.0244.83 ▼4.41
Posts /wp-admin/edit.php3.43 ▲0.0848.96 ▲3.34
Add New Post /wp-admin/post-new.php5.90 ▲0.0190.21 ▼9.32
Media Library /wp-admin/upload.php3.24 ▲0.0132.90 ▲1.57

Server storage [IO: ▲0.24MB] [DB: ▲0.00MB] 67% from 3 tests

Filesystem and database footprint
Please try to fix the following items
  • Illegal file modification found: 1 file (0.00KB) outside of "wp-content/plugins/taboola/" and "wp-content/uploads/"
    • (new file) wp-admin/logs/.empty
Filesystem: 16 new files
Database: 1 new table, 7 new options
New tables
wp__taboola_settings
New WordPress options
taboola_plugin_version
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Taboola
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲5814.68 ▲0.341.60 ▼0.1043.01 ▼1.48
Dashboard /wp-admin2,213 ▲355.56 ▼0.1188.57 ▼13.1670.50 ▲30.48
Posts /wp-admin/edit.php2,121 ▲211.95 ▲0.0139.22 ▲0.3032.89 ▼4.74
Add New Post /wp-admin/post-new.php1,553 ▲2722.98 ▼0.31663.20 ▲26.6949.28 ▼2.09
Media Library /wp-admin/upload.php1,418 ▲214.13 ▼0.0198.24 ▼1.6461.63 ▲19.24

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp__taboola_settings
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • taboola_plugin_version

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/taboola/settings.php
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/taboola/widget.php:4
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/taboola/settings.php:429
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/taboola/widget.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Tags: There are too many tags (31 tag instead of maximum 10)
You can take inspiration from this readme.txt

taboola/taboola_widget.php 85% from 13 tests

The primary PHP file in "Taboola" version 2.1.0 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("taboola.php" instead of "taboola_widget.php")
  • Description: Please use more than 10 characters for the plugin description (currently 7 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin2,786 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP55504152,649
JavaScript5208137

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity87.40
▷ Minimum class complexity1.00
▷ Maximum class complexity198.00
Average method complexity4.37
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods128
▷ Static methods10.78%
▷ Public methods10884.38%
▷ Protected methods1612.50%
▷ Private methods43.12%
Functions7
▷ Named functions685.71%
▷ Anonymous functions114.29%
Constants33
▷ Global constants33100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
4 PNG files occupy 0.06MB with 0.04MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/taboola_icon.png3.15KB0.80KB▼ 74.47%
img/taboola.png49.68KB23.75KB▼ 52.19%
img/question-mark.png1.20KB0.29KB▼ 75.73%
img/arrow_right_32.png4.12KB0.19KB▼ 95.30%