65% wp-pipes

Code Review | WP Pipes

WordPress plugin WP Pipes scored65%from 54 tests.

About plugin

  • Plugin page: wp-pipes
  • Plugin version: 1.4.1
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.3
  • WordPress version: 6.3.1
  • First release: Feb 14, 2014
  • Latest release: Aug 11, 2023
  • Number of updates: 155
  • Update frequency: every 22.4 days
  • Top authors: thongta (72.9%)phamtungpth (12.26%)phonglq.foobla (9.03%)ThimPress (6.45%)tunnhn (1.94%)

Code review

54 tests

User reviews

37 reviews

Install metrics

1,000+ active /127,497 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.22MB] [CPU: ▼0.00ms] 75% from 4 tests

An overview of server-side resources used by WP Pipes
Please have a look at the following items
  • CPU: Try to keep total CPU usage under 500.00ms (currently 1,244.52ms on /wp-admin/admin.php?page=pipes.plugins)
PageMemory (MB)CPU Time (ms)
Home /3.67 ▲0.2042.60 ▼3.44
Dashboard /wp-admin3.53 ▲0.2251.79 ▼1.90
Posts /wp-admin/edit.php3.64 ▲0.2855.37 ▲5.09
Add New Post /wp-admin/post-new.php6.11 ▲0.22101.36 ▲1.16
Media Library /wp-admin/upload.php3.45 ▲0.2238.81 ▲4.16
Add New /wp-admin/admin.php?page=pipes.pipe3.8141.87
Settings /wp-admin/admin.php?page=pipes.settings3.5035.89
Addons /wp-admin/admin.php?page=pipes.plugins3.651,244.52
All Pipes /wp-admin/admin.php?page=pipes.pipes3.7435.98

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 468 new files
Database: 2 new tables, 11 new options
New tables
wp_wppipes_pipes
wp_wppipes_items
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
pipes_active
pipes_start_at
widget_recent-comments
can_compress_scripts
pipes_schedule
db_upgraded
pipes_cronjob_active
widget_recent-posts
...

Browser metrics Passed 4 tests

Checking browser requirements for WP Pipes
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,862 ▲11613.55 ▼1.192.94 ▲0.6642.26 ▼0.39
Dashboard /wp-admin2,237 ▲495.85 ▼0.05105.65 ▼8.7041.52 ▼2.95
Posts /wp-admin/edit.php2,120 ▲312.06 ▲0.0341.40 ▲7.9534.61 ▼1.43
Add New Post /wp-admin/post-new.php1,557 ▲2422.25 ▼0.94699.17 ▲8.6754.20 ▼2.82
Media Library /wp-admin/upload.php1,416 ▲284.21 ▼0.0197.20 ▼1.6040.57 ▼3.35
Add New /wp-admin/admin.php?page=pipes.pipe1,9212.7039.0278.39
Settings /wp-admin/admin.php?page=pipes.settings1,5042.1730.2945.61
Addons /wp-admin/admin.php?page=pipes.plugins1,3003.3159.0332.16
All Pipes /wp-admin/admin.php?page=pipes.pipes1,6102.6541.9831.20

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=pipes.pipes
    • > Notice in wp-content/plugins/wp-pipes/helpers/common.php+186
    Undefined index: HTTP_X_FORWARDED_FOR
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=pipes.pipes
    • > Notice in wp-content/plugins/wp-pipes/helpers/common.php+188
    Undefined index: HTTP_CLIENT_IP

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 62× PHP files output text when accessed directly (only 10 are shown):
    • > /wp-content/plugins/wp-pipes/plugins/processors/original_source/original_source.php
    • > /wp-content/plugins/wp-pipes/plugins/processors/cut_introtext/cut_introtext.php
    • > /wp-content/plugins/wp-pipes/plugins/engines/post/post.php
    • > /wp-content/plugins/wp-pipes/plugins/engines/post/fields/postcategories.php
    • > /wp-content/plugins/wp-pipes/plugins/processors/get_fulltext/readability.php
    • > /wp-content/plugins/wp-pipes/plugins/adapters/post/fields/postcategories.php
    • > /wp-content/plugins/wp-pipes/includes/application.php
    • > /wp-content/plugins/wp-pipes/plugins/processors/get_fulltext/lib/psc.php
    • > /wp-content/plugins/wp-pipes/post.html.php
    • > /wp-content/plugins/wp-pipes/views/plugins/view.php
  • 10× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'SimplePie' not found in wp-content/plugins/wp-pipes/plugins/engines/rssreader/helpers/library/SimplePie/Core.php:54
    • > PHP Fatal error
      Uncaught Error: Interface 'SimplePie_Cache_Base' not found in wp-content/plugins/wp-pipes/plugins/engines/rssreader/helpers/library/SimplePie/Cache/File.php:51
    • > PHP Fatal error
      Uncaught Error: Class 'SimplePie_Cache_DB' not found in wp-content/plugins/wp-pipes/plugins/engines/rssreader/helpers/library/SimplePie/Cache/MySQL.php:57
    • > PHP Fatal error
      Uncaught Error: Class 'SimplePie_Misc' not found in wp-content/plugins/wp-pipes/plugins/engines/rssreader/helpers/library/SimplePie.php:59
    • > PHP Warning
      require_once(wp-content/plugins/wp-pipes/plugins/processors/get_fulltext/JSLikeHTMLElement.php): failed to open stream: No such file or directory in wp-content/plugins/wp-pipes/plugins/processors/get_fulltext/readability_1.7.1.php on line 48
    • > PHP Fatal error
      Uncaught Error: Class 'JFormField' not found in wp-content/plugins/wp-pipes/plugins/adapters/rss/fields/feedurl.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_upload_dir() in wp-content/plugins/wp-pipes/define.php:23
    • > PHP Fatal error
      Uncaught Error: Interface 'SimplePie_Cache_Base' not found in wp-content/plugins/wp-pipes/plugins/engines/rssreader/helpers/library/SimplePie/Cache/DB.php:51
    • > PHP Fatal error
      Uncaught Error: Interface 'SimplePie_Cache_Base' not found in wp-content/plugins/wp-pipes/plugins/engines/rssreader/helpers/library/SimplePie/Cache/Memcache.php:58
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-content/plugins/wp-pipes/plugins/processors/get_fulltext/JSLikeHTMLElement.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-pipes/plugins/processors/get_fulltext/readability_1.7.1.php on line 48

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There are user-side issues you should fix
    • > GET request to /wp-admin/admin.php?page=pipes.pipe
    • > Network (severe)
    wp-content/plugins/wp-pipes/assets/css/chosen-sprite.png - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=pipes.pipes
    • > Network (severe)
    https://thimpress.com/wp-content/uploads/2017/06/mag.__large_preview.png - Failed to load resource: the server responded with a status of 404 ()

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Tags: Please reduce the number of tags, currently 28 tag instead of maximum 10
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === wp-pipes === )
You can take inspiration from this readme.txt

wp-pipes/pipes.php 77% from 13 tests

The main PHP script in "WP Pipes" version 1.4.1 is automatically included on every request by WordPress
The following require your attention:
  • Requires PHP: Required version must be the same as the one declared in readme.txt ("7.0" instead of "7.4")
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wp-pipes.php" instead of "pipes.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin58,315 lines of code in 326 files:
LanguageFilesBlank linesComment linesLines of code
PHP2407,63222,49239,042
JavaScript92,73615,28213,283
CSS7121432,462
Sass131922928
LESS121827907
XML1744710
PO File7143289421
SVG100414
HTML1720109
INI32739

PHP code 50% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Please fix the following
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 808)
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity29.18
▷ Minimum class complexity1.00
▷ Maximum class complexity945.00
Average method complexity5.36
▷ Minimum method complexity1.00
▷ Maximum method complexity808.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes262
▷ Abstract classes4316.41%
▷ Concrete classes21983.59%
▷ Final classes00.00%
Methods1,706
▷ Static methods58034.00%
▷ Public methods1,53189.74%
▷ Protected methods1659.67%
▷ Private methods100.59%
Functions67
▷ Named functions6698.51%
▷ Anonymous functions11.49%
Constants138
▷ Global constants12993.48%
▷ Class constants96.52%
▷ Public constants9100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
10 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/chosen-sprite.png0.55KB0.70KB0.00%
assets/images/pipe-step-3.png2.87KB2.33KB▼ 19.07%
plugins/processors/cut_introtext/cut_introtext.png2.85KB2.07KB▼ 27.57%
plugins/processors/duplicate/duplicate.png0.88KB0.59KB▼ 32.52%
plugins/processors/image/image.png3.41KB2.04KB▼ 40.16%