57% pushpress-integration

Code Review | PushPress.com

WordPress plugin PushPress.com scored57%from 54 tests.

About plugin

  • Plugin page: pushpress-integra...
  • Plugin version: 1.6.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.6.1
  • WordPress version: 6.3.1
  • First release: Aug 25, 2015
  • Latest release: Nov 2, 2017
  • Number of updates: 118
  • Update frequency: every 7.4 days
  • Top authors: pushpress (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /8,420 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.41MB] [CPU: ▼45.00ms] Passed 4 tests

This is a short check of server-side resources used by PushPress.com
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1021.90 ▼23.20
Dashboard /wp-admin3.62 ▲0.2726.16 ▼44.17
Posts /wp-admin/edit.php3.62 ▲0.2631.09 ▼25.34
Add New Post /wp-admin/post-new.php3.62 ▼2.2725.83 ▼87.30
Media Library /wp-admin/upload.php3.62 ▲0.3928.78 ▼9.79

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

Analyzing filesystem and database footprints of this plugin
It is recommended to fix the following issues
  • There were 1 file (4.00KB) illegally modified outside of "wp-content/plugins/pushpress-integration/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 109 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

PushPress.com: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,970 ▲20913.82 ▼0.3911.54 ▲9.7142.27 ▼6.44
Dashboard /wp-admin2,250 ▲535.92 ▲0.11126.99 ▲12.66100.92 ▲59.93
Posts /wp-admin/edit.php2,132 ▲292.14 ▲0.1439.99 ▼3.9337.13 ▼1.30
Add New Post /wp-admin/post-new.php1,706 ▲17522.49 ▼0.80712.98 ▲69.3335.84 ▼16.35
Media Library /wp-admin/upload.php1,426 ▲264.30 ▲0.06114.98 ▼0.1884.51 ▲35.29

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
The following items require your attention
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/pushpress-integration/pushpress.php+283
    Trying to access array offset on value of type null
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/pushpress-integration/templates/frontend/shortcode_products.php
  • 52× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Pushpress_ApiResource' not found in wp-content/plugins/pushpress-integration/lib/php-sdk/lib/Pushpress/Contract.php:3
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/pushpress-integration/templates/frontend/shortcode_schedules.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Pushpress_ApiResource' not found in wp-content/plugins/pushpress-integration/lib/php-sdk/lib/Pushpress/Message.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Pushpress_ApiResource' not found in wp-content/plugins/pushpress-integration/lib/php-sdk/lib/Pushpress/Calendar.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Pushpress_ApiResource' not found in wp-content/plugins/pushpress-integration/lib/php-sdk/lib/Pushpress/Checkin.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Pushpress_ApiResource' not found in wp-content/plugins/pushpress-integration/lib/php-sdk/lib/Pushpress/Billing.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Pushpress_ApiResource' not found in wp-content/plugins/pushpress-integration/lib/php-sdk/lib/Pushpress/Product.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Pushpress_Error' not found in wp-content/plugins/pushpress-integration/lib/php-sdk/lib/Pushpress/Error/ApiConnectionError.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Pushpress_ApiResource' not found in wp-content/plugins/pushpress-integration/lib/php-sdk/lib/Pushpress/Track.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Pushpress_ApiResource' not found in wp-content/plugins/pushpress-integration/lib/php-sdk/lib/Pushpress/Waiver.php:2

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === pushpress-integration === )
Please take inspiration from this readme.txt

pushpress-integration/pushpress.php 85% from 13 tests

The main PHP script in "PushPress.com" version 1.6.6 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("pushpress-integration.php" instead of "pushpress.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 215 characters long)

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Almost there! Just fix the following issues
  • For security reasons, never distribute binary or executable files with your plugin
    • .crt - Security Certificate in Firefox, IE, Chrome, Safari
      • wp-content/plugins/pushpress-integration/lib/php-sdk/data/ca-certificates.crt
7,601 lines of code in 69 files:
LanguageFilesBlank linesComment linesLines of code
PHP571,0123674,912
CSS6115871,788
JavaScript4307520848
Markdown120040
JSON10013

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity7.48
▷ Minimum class complexity1.00
▷ Maximum class complexity97.00
Average method complexity1.73
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes48
▷ Abstract classes48.33%
▷ Concrete classes4491.67%
▷ Final classes00.00%
Methods424
▷ Static methods22452.83%
▷ Public methods40695.75%
▷ Protected methods122.83%
▷ Private methods61.42%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants23
▷ Global constants2295.65%
▷ Class constants14.35%
▷ Public constants1100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
38 PNG files occupy 1.53MB with 0.88MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/images/ui-bg_flat_10_000000_40x100.png0.24KB0.08KB▼ 64.34%
css/images/ui-bg_highlight-soft_75_ffe45c_1x100.png0.36KB0.18KB▼ 48.50%
images/icon_plans.png1.46KB1.00KB▼ 31.25%
asset/screenshot-7.png89.88KB24.72KB▼ 72.49%
assets/screenshot-7.png89.88KB24.72KB▼ 72.49%