72% pramadillo-priceline-partner-network

Code Review | Priceline Partner Network for Wordpress

WordPress plugin Priceline Partner Network for Wordpress scored72%from 54 tests.

About plugin

  • Plugin page: pramadillo-pricel...
  • Plugin version: 1.1.6
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.5
  • WordPress version: 6.3.1
  • First release: Feb 26, 2018
  • Latest release: Jul 13, 2021
  • Number of updates: 5
  • Update frequency: every 246.6 days
  • Top authors: mattpramschufer (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /994 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.09MB] [CPU: ▼2.72ms] Passed 4 tests

An overview of server-side resources used by Priceline Partner Network for Wordpress
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1035.09 ▼3.69
Dashboard /wp-admin3.40 ▲0.0945.80 ▲2.16
Posts /wp-admin/edit.php3.51 ▲0.1547.00 ▼3.83
Add New Post /wp-admin/post-new.php5.98 ▲0.0991.27 ▼5.50
Media Library /wp-admin/upload.php3.32 ▲0.0935.71 ▲2.82
Priceline Partner Network /wp-admin/options-general.php?page=priceline-partner-network3.3536.26

Server storage [IO: ▲0.25MB] [DB: ▲0.07MB] Passed 3 tests

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

Browser metrics Passed 4 tests

An overview of browser requirements for Priceline Partner Network for Wordpress
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲4914.28 ▼0.071.68 ▲0.0840.85 ▼1.82
Dashboard /wp-admin2,202 ▲215.59 ▼0.1293.95 ▼7.5340.76 ▼2.65
Posts /wp-admin/edit.php2,107 ▲42.03 ▲0.0239.08 ▲0.0535.43 ▲1.77
Add New Post /wp-admin/post-new.php1,538 ▲718.18 ▼5.01631.94 ▼37.3566.64 ▲14.64
Media Library /wp-admin/upload.php1,401 ▲74.21 ▼0.03115.45 ▲20.2348.99 ▲6.34
Priceline Partner Network /wp-admin/options-general.php?page=priceline-partner-network1,2572.1227.3139.31

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Almost there, just fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=priceline-partner-network
    • > request to
    • > Notice in wp-config.php+20
    Undefined index: REQUEST_METHOD

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
Please fix the following
  • 6× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/pramadillo-priceline-partner-network/public/partials/search-box-car.php
    • > /wp-content/plugins/pramadillo-priceline-partner-network/public/partials/search-box-multi.php
    • > /wp-content/plugins/pramadillo-priceline-partner-network/public/partials/search-box-flight.php
    • > /wp-content/plugins/pramadillo-priceline-partner-network/public/partials/search-box-hotel.php
    • > /wp-content/plugins/pramadillo-priceline-partner-network/public/partials/city-list.php
    • > /wp-content/plugins/pramadillo-priceline-partner-network/public/partials/search-box-vp.php
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr_e() in wp-content/plugins/pramadillo-priceline-partner-network/admin/partials/settings.php:3
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/pramadillo-priceline-partner-network/public/partials/city-list.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr_e() in wp-content/plugins/pramadillo-priceline-partner-network/admin/partials/settings-sidebar.php:3
    • > PHP Notice
      Undefined variable: cities in wp-content/plugins/pramadillo-priceline-partner-network/public/partials/city-list.php on line 5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
4 plugin tags: travel, priceline, priceline partner network, ppn

pramadillo-priceline-partner-network/priceline-partner-network.php 85% from 13 tests

The main PHP script in "Priceline Partner Network for Wordpress" version 1.1.6 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("pramadillo-priceline-partner-network.php" instead of "priceline-partner-network.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 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
Everything looks great! No dangerous files found in this plugin2,462 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
PHP182383951,354
CSS21460764
JavaScript75027344

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.08
Average class complexity3.00
▷ Minimum class complexity1.00
▷ Maximum class complexity11.00
Average method complexity1.42
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods32
▷ Static methods26.25%
▷ Public methods2578.12%
▷ Protected methods26.25%
▷ Private methods515.62%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/img/products_highlight.png1.99KB1.09KB▼ 45.29%
public/img/products.png1.99KB1.09KB▼ 45.24%
public/img/icons.png4.07KB2.09KB▼ 48.63%