78% paypal-promotions-and-insights

Code Review | PayPal Marketing Solutions

WordPress plugin PayPal Marketing Solutions scored78%from 54 tests.

About plugin

  • Plugin page: paypal-promotions...
  • Plugin version: 1.2
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1.1-4.9.8
  • WordPress version: 6.3.1
  • First release: Oct 19, 2017
  • Latest release: Dec 5, 2018
  • Number of updates: 7
  • Update frequency: every 59.3 days
  • Top authors: paypalmuse (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /12,506 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.03MB] [CPU: ▼5.97ms] Passed 4 tests

This is a short check of server-side resources used by PayPal Marketing Solutions
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.92 ▼2.69
Dashboard /wp-admin3.35 ▲0.0544.84 ▼5.89
Posts /wp-admin/edit.php3.40 ▲0.0449.46 ▼1.83
Add New Post /wp-admin/post-new.php5.93 ▲0.0492.76 ▼13.47
Media Library /wp-admin/upload.php3.27 ▲0.0436.60 ▼0.87

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by PayPal Marketing Solutions
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲8513.12 ▼1.145.30 ▲3.4744.30 ▲2.43
Dashboard /wp-admin2,212 ▲214.86 ▼0.04106.91 ▲2.2740.61 ▼7.77
Posts /wp-admin/edit.php2,098 ▲92.05 ▼0.0839.45 ▼1.2534.87 ▲0.66
Add New Post /wp-admin/post-new.php1,542 ▼018.51 ▲0.17633.03 ▲3.9557.12 ▼1.52
Media Library /wp-admin/upload.php1,397 ▲64.18 ▲0.0298.62 ▼5.2145.15 ▲1.94
PayPal Marketing Solutions /wp-admin/paypal-marketing-solutions.php260.440.0913.68

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded

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)
Good news, no errors were detected

SRP 50% 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
The following issues need your attention
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/paypal-promotions-and-insights/includes/admin/class-paypal-marketing-solutions-admin.php:368
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/paypal-promotions-and-insights/includes/frontend/class-paypal-marketing-solutions-frontend.php:55

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)
Please take a look at the following user-side issues
    • > GET request to /wp-admin/paypal-marketing-solutions.php
    • > Network (severe)
    wp-admin/paypal-marketing-solutions.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
6 plugin tags: statistics, seo, solutions, marketing, tracking...

paypal-promotions-and-insights/paypal-promotions-and-insights.php 85% from 13 tests

Analyzing the main PHP file in "PayPal Marketing Solutions" version 1.2
Please make the necessary changes and fix the following:
  • Domain Path: The domain path folder was not found ("/languages")
  • Text Domain: The text domain name should consist of only dashes and lowercase characters

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
No dangerous file extensions were detected410 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP354175309
CSS1201101

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity5.50
▷ Minimum class complexity2.00
▷ Maximum class complexity9.00
Average method complexity1.69
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods969.23%
▷ Protected methods430.77%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants225.00%
▷ Class constants675.00%
▷ Public constants6100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
6 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/header-image.png10.29KB4.02KB▼ 60.93%
assets/img/arrow.png0.35KB0.25KB▼ 28.73%
assets/img/icon-2.png4.08KB2.19KB▼ 46.17%
assets/img/icon-3.png3.57KB2.05KB▼ 42.59%
assets/img/arrow-down.png14.88KB0.23KB▼ 98.48%