83% pickit

Code Review | Pickit

WordPress plugin Pickit scored83%from 54 tests.

About plugin

  • Plugin page: pickit
  • Plugin version: 3.0.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4.1-5.3
  • WordPress version: 6.3.1
  • First release: Dec 5, 2019
  • Latest release: Aug 18, 2022
  • Number of updates: 62
  • Update frequency: every 15.9 days
  • Top authors: erospanuccio (66.13%)integracionespickit (35.48%)

Code review

54 tests

User reviews

3 reviews

Install metrics

30+ active /3,360 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼13.77ms] Passed 4 tests

Analyzing server-side resources used by Pickit
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.24 ▼10.26
Dashboard /wp-admin3.31 ▼0.0447.99 ▼17.65
Posts /wp-admin/edit.php3.36 ▲0.0043.21 ▼9.41
Add New Post /wp-admin/post-new.php5.89 ▲0.0088.35 ▼17.75
Media Library /wp-admin/upload.php3.23 ▲0.0037.32 ▲0.46

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Pickit
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.18 ▼1.191.98 ▲0.2042.92 ▲3.55
Dashboard /wp-admin2,206 ▲185.85 ▲0.9898.92 ▼5.3138.27 ▼4.95
Posts /wp-admin/edit.php2,086 ▼32.01 ▲0.0234.25 ▼2.0333.44 ▼3.42
Add New Post /wp-admin/post-new.php1,514 ▼617.54 ▼5.58677.44 ▲0.2769.25 ▲11.90
Media Library /wp-admin/upload.php1,388 ▼04.21 ▲0.05114.98 ▲12.2547.86 ▲0.78

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

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 take a closer look at the following
  • 11× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: args in wp-content/plugins/pickit/templates/adminlist-gotopickit.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'Ecomerciar\\Pickit\\Helper\\Helper' not found in wp-content/plugins/pickit/templates/checkout-point-selector.php:4
    • > PHP Fatal error
      Trait 'Ecomerciar\\Pickit\\Helper\\TemplatesTrait' not found in wp-content/plugins/pickit/src/helper/class-helper.php on line 4
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/pickit/templates/adminlist-gotopickit.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'Ecomerciar\\Pickit\\Helper\\Helper' not found in wp-content/plugins/pickit/templates/checkout-point-map-selector.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/pickit/templates/adminlist-gotopickit.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Ecomerciar\\Pickit\\Api\\ApiConnector' not found in wp-content/plugins/pickit/src/api/class-pickit-api.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Ecomerciar\\Pickit\\Helper\\Helper' not found in wp-content/plugins/pickit/templates/pickitpanel-init.php:3
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/pickit/templates/adminlist-gotopickit.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'Ecomerciar\\Pickit\\Helper\\Helper' not found in wp-content/plugins/pickit/templates/page-onboarding.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed:
  • Tags: There are too many tags (15 tag instead of maximum 10)
You can take inspiration from this readme.txt

pickit/pickit-woo.php 77% from 13 tests

The entry point to "Pickit" version 3.0.1 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("pickit.php" instead of "pickit-woo.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Requires PHP: The required version number did not match the one declared in readme.txt ("5.7" instead of "7.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected3,391 lines of code in 36 files:
LanguageFilesBlank linesComment linesLines of code
PHP334348473,008
CSS36021383

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity11.88
▷ Minimum class complexity1.00
▷ Maximum class complexity76.00
Average method complexity3.35
▷ Minimum method complexity1.00
▷ Maximum method complexity37.00
Code structure
Namespaces8
Interfaces1
Traits7
Classes18
▷ Abstract classes211.11%
▷ Concrete classes1688.89%
▷ Final classes00.00%
Methods127
▷ Static methods9776.38%
▷ Public methods11993.70%
▷ Protected methods32.36%
▷ Private methods53.94%
Functions5
▷ Named functions00.00%
▷ Anonymous functions5100.00%
Constants8
▷ Global constants00.00%
▷ Class constants8100.00%
▷ Public constants8100.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.30MB with 0.17MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/processing.png154.67KB39.19KB▼ 74.66%
assets/img/pickit_isologo.png3.09KB1.99KB▼ 35.56%
assets/img/pickit-woo-icons.png12.84KB5.63KB▼ 56.13%
assets/img/error.png2.05KB1.12KB▼ 45.67%
assets/img/pickit-left-pane-img.png132.64KB39.46KB▼ 70.25%