10% photopress-paypal-shopping-cart

Code Review | PhotoPress - PayPal Shopping Cart

WordPress plugin PhotoPress - PayPal Shopping Cart scored10%from 54 tests.

About plugin

  • Plugin page: photopress-paypal...
  • Plugin version: 1.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2.1-4.9.1
  • WordPress version: 6.3.1
  • First release: Dec 29, 2012
  • Latest release: Dec 3, 2017
  • Number of updates: 44
  • Update frequency: every 40.9 days
  • Top authors: padams (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /3,914 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
These installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/photopress-paypal-shopping-cart/photopress-paypal-shopping-cart.php+472
    Methods with the same name as their class will not be constructors in a future version of PHP; papt_displaySingleProductBuyButtonWidget has a deprecated constructor

Server metrics [RAM: ▼1.81MB] [CPU: ▼53.17ms] Passed 4 tests

An overview of server-side resources used by PhotoPress - PayPal Shopping Cart
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.17 ▼1.294.95 ▼35.32
Dashboard /wp-admin2.19 ▼1.116.06 ▼47.52
Posts /wp-admin/edit.php2.20 ▼1.165.72 ▼43.82
Add New Post /wp-admin/post-new.php2.19 ▼3.697.56 ▼86.00
Media Library /wp-admin/upload.php2.19 ▼1.037.29 ▼30.66
Photo Purchase Variations /wp-admin/edit-tags.php?taxonomy=photos_purchase_variations&post_type=attachment2.206.40
PP Purchase Variations /wp-admin/options-general.php?page=photopress-spsc-admin-page2.207.18

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for PhotoPress - PayPal Shopping Cart
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,833 ▲7214.73 ▲0.091.63 ▼0.1443.48 ▲4.37
Dashboard /wp-admin2,242 ▲365.86 ▼0.05101.21 ▲0.6739.38 ▼4.33
Posts /wp-admin/edit.php2,098 ▼22.00 ▼0.0536.59 ▼3.8035.42 ▼0.83
Add New Post /wp-admin/post-new.php1,568 ▲2823.37 ▲5.25665.36 ▲49.3251.61 ▼0.41
Media Library /wp-admin/upload.php1,418 ▲184.18 ▼0.01100.24 ▼2.7545.67 ▼0.33
Photo Purchase Variations /wp-admin/edit-tags.php?taxonomy=photos_purchase_variations&post_type=attachment1,2942.2728.7032.48
PP Purchase Variations /wp-admin/options-general.php?page=photopress-spsc-admin-page8032.0624.3927.18

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/photopress-paypal-shopping-cart/photopress-paypal-shopping-cart.php+472
    Methods with the same name as their class will not be constructors in a future version of PHP; papt_displaySingleProductBuyButtonWidget has a deprecated constructor
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These errors were triggered by the plugin
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=photopress-spsc-admin-page
    • > Deprecated in wp-content/plugins/photopress-paypal-shopping-cart/photopress-paypal-shopping-cart.php+472
    Methods with the same name as their class will not be constructors in a future version of PHP; papt_displaySingleProductBuyButtonWidget has a deprecated constructor
    • > GET request to /wp-admin/options-general.php?page=photopress-spsc-admin-page
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=photopress-spsc-admin-page
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=photopress-spsc-admin-page
    • > Notice in wp-content/plugins/photopress-paypal-shopping-cart/photopress-paypal-shopping-cart.php+720
    Undefined variable: checked

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/photopress-paypal-shopping-cart/photopress-paypal-shopping-cart.php:472

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
9 plugin tags: selling photos, images, e-commerce, print ordering, photos...

photopress-paypal-shopping-cart/photopress-paypal-shopping-cart.php 92% from 13 tests

The principal PHP file in "PhotoPress - PayPal Shopping Cart" v. 1.8 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 141 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected434 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1191113434

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity14.67
▷ Minimum class complexity4.00
▷ Maximum class complexity36.00
Average method complexity2.78
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods23
▷ Static methods1252.17%
▷ Public methods23100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin