78% flexible-pickup

Code Review | Flexible Pickup

WordPress plugin Flexible Pickup scored78%from 54 tests.

About plugin

  • Plugin page: flexible-pickup
  • Plugin version: 1.0.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-4.8
  • WordPress version: 6.3.1
  • First release: Dec 3, 2017
  • Latest release: Dec 6, 2017
  • Number of updates: 6
  • Update frequency: every 1.3 days
  • Top authors: grola (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /659 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.24MB] [CPU: ▼5.84ms] Passed 4 tests

Analyzing server-side resources used by Flexible Pickup
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1222.39 ▼18.47
Dashboard /wp-admin3.58 ▲0.2849.90 ▲0.80
Posts /wp-admin/edit.php3.63 ▲0.2849.89 ▲4.10
Add New Post /wp-admin/post-new.php6.16 ▲0.2885.69 ▼9.79
Media Library /wp-admin/upload.php3.50 ▲0.2838.44 ▲5.30
Settings /wp-admin/edit.php?post_type=pickup_point&page=flexible-pickup-settings3.5238.21
Install Plugins /wp-admin/plugins.php?page=tgmpa-install-plugins3.5132.31
Add new Pickup Point /wp-admin/post-new.php?post_type=pickup_point3.6548.52
Pickup Points Groups /wp-admin/edit-tags.php?taxonomy=fp_points_group&post_type=pickup_point3.5034.40
Pickup Points /wp-admin/edit.php?post_type=pickup_point3.5537.39

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 63 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-posts
recovery_mode_email_last_sent
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
flexible_pickup_settings
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Flexible Pickup
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,542 ▼19313.26 ▼1.120.48 ▼1.5117.98 ▼28.25
Dashboard /wp-admin2,280 ▲925.84 ▲0.95101.74 ▲0.0943.96 ▲6.53
Posts /wp-admin/edit.php2,174 ▲882.06 ▲0.0241.86 ▲6.4837.36 ▲4.36
Add New Post /wp-admin/post-new.php1,581 ▲6217.64 ▼5.82592.07 ▼71.2160.43 ▲5.47
Media Library /wp-admin/upload.php1,470 ▲854.27 ▲0.0596.71 ▼5.1549.00 ▲5.61
Settings /wp-admin/edit.php?post_type=pickup_point&page=flexible-pickup-settings1,6254.0064.0232.72
Install Plugins /wp-admin/plugins.php?page=tgmpa-install-plugins1,0592.0926.1330.58
Add new Pickup Point /wp-admin/post-new.php?post_type=pickup_point1,4591.578.4238.43
Pickup Points Groups /wp-admin/edit-tags.php?taxonomy=fp_points_group&post_type=pickup_point1,3442.3228.7432.63
Pickup Points /wp-admin/edit.php?post_type=pickup_point1,1362.0634.2431.19

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 8 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • flexible_pickup_settings
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • recovery_mode_email_last_sent

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
    • > GET request to /wp-admin/post-new.php?post_type=pickup_point
    • > Error in wp-content/plugins/flexible-pickup/classes/views/pickup-point-settings.php+10
    Uncaught Error: Call to undefined function woocommerce_wp_text_input() in wp-content/plugins/flexible-pickup/classes/views/pickup-point-settings.php:10
    Stack trace:
    #0 wp-content/plugins/flexible-pickup/classes/class-cpt.php(127): include()
    #1 wp-admin/includes/template.php(1443): Flexible_Pickup_Post_Type->pickup_point_meta_box_output()
    #2 wp-admin/edit-form-advanced.php(711): do_meta_boxes()
    #3 wp-admin/post-new.php(75): require('/var/www/wordpr...')
    #4 {main}
    thrown

SRP 50% 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 items
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/flexible-pickup/classes/views/admin-footer.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function did_action() in wp-content/plugins/flexible-pickup/classes/class-tgm-plugin-activation.php:2109
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/flexible-pickup/templates/label.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
4 plugin tags: woocommerce, pickup point, flexible shipping, shipping

flexible-pickup/flexible-pickup.php 92% from 13 tests

The primary PHP file in "Flexible Pickup" version 1.0.3 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Domain Path: The domain path folder was not found ("/languages/")

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
Success! There were no dangerous files found in this plugin7,269 lines of code in 53 files:
LanguageFilesBlank linesComment linesLines of code
PHP291,3342,8336,190
PO File2262394658
JavaScript84113266
CSS142117155

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity46.64
▷ Minimum class complexity1.00
▷ Maximum class complexity206.00
Average method complexity4.05
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes22
▷ Abstract classes00.00%
▷ Concrete classes22100.00%
▷ Final classes00.00%
Methods329
▷ Static methods61.82%
▷ Public methods29990.88%
▷ Protected methods247.29%
▷ Private methods61.82%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants00.00%
▷ Class constants4100.00%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin